首页 > 其他 > 详细

事件对象练习

时间:2017-09-10 10:55:34      阅读:219      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>事件对象练习</title>
<style>
body{
height: 400px;
}
</style>
</head>
<body>
<script>
document.onclick = function(event){
// alert(event.target);
var event = event || window.event;
// console.log(event);
console.log(event.clientY);

// console.log(event.clientX);
console.log(event.pageY);
console.log(event.screenY);
}
</script>
</body>
</html>

事件对象练习

原文:http://www.cnblogs.com/xlhlcy/p/7500353.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!