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>

posted @ 2019-10-31 13:38  一只小白呀  阅读(611)  评论(0编辑  收藏  举报