<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>简单事件处理</title>
</head>
<style type="text/css">
#info
{
height:50px;
width:200px;
font-size: 16px;
background-color: #0C6;
}
</style>
<script type="text/javascript">
window.onmousemove=function(evt) 
{
if(window.event) evt=window.event;
document.getElementById("info").innerHTML=evt.screenX+":"+evt.screenY;
if(evt.ctrlKey)
{
document.getElementById("info").innerHTML+=":Ctrl";
}
}
</script>
<body>
<div id="info">
</div>
</body>

</html>

简单事件处理

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-05-23
  • 2021-07-11
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-03-05
  • 2021-05-01
  • 2022-01-02
  • 2021-11-13
  • 2021-06-06
  • 2021-08-30
相关资源
相似解决方案