您的位置:首页 > Web前端 > JavaScript

网页编程----js键盘事件小应用

2007-08-10 14:30 387 查看
代码来自PHPFANS管理员blankyao

<HTML>
<BODY>

<script type="text/javascript" language="javascript">
function mouseOverFunction()
{
if(window.event.shiftKey && window.event.ctrlKey)
{
document.form1.textbox.value="shif and ctrl keys down and mous over at :"+window.event.x+"'"+window.event.y
}
return

}
</script>

<center>
<form name="form1" action="action">
<h1>use the mouse in javascript</h1>
<br/>
clickthemouse(hold shift ctrl alt)
<br/>
<a href="mouse.htm" name="mouselink"
onmouseover="mouseOverFunction()"
>
move the mouse please
</a>
<br/>
<br/>
<input type="text" name="textbox" size="60"/>
</form>
</center>

</BODY>
</HTML>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: