js_onmouse--

<!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>

js_onmouse--

上一篇:html标签初识(一)


下一篇:每周一题:拿硬币(更新JS)