js_onmouse--

时间:2020-08-18 13:17:18   收藏:0   阅读:68
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title</title>
<meta charset="UTF-8">
<!--&lt;!&ndash; <script src="js_file01.js"></script>&ndash;&gt; 尽量放后body前边-->

<style>
div{
width: 200px;
height: 100px;
background-color: #178cfa;
}

</style>

</head>
<body>

<div onmousedown="down1()" onmousemove="move1()" onmouseout="out1()" onmouseover="over1()">hello</div>

<script>

function down1() {
console.log("down")
}

function move1() {
console.log("move1")
}

function out1() {
console.log("out1")
}

function over1() {
console.log("over1")
}

</script>

</body>
</html>
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!