标签:page doc 对象 document target alert 事件对象 练习 lang
<!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>
标签:page doc 对象 document target alert 事件对象 练习 lang
原文地址:http://www.cnblogs.com/xlhlcy/p/7500353.html