JavaScript mouse事件

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
height: 100px;
background-color: #84a42b;
width: 200px;
}
</style>
</head>
<body>

<div onmousedown="down()" onmousemove="move()" >div1</div>


<script>
function down() {
console.log("down");
}
function move() {
console.log("move");
}
function out() {
console.log("out");
}
function over() {
console.log("over");
}
</script>


</body>
</html>

猜你喜欢

转载自www.cnblogs.com/gerenboke/p/11770699.html