javascript onmouseover、onmouseout练习代码


<html>
<meta charset="UTF-8">
<head>
head>
<body>
<div id="mouse" style="background-color: #33cccc;width: 200px;height: 200px;"
     onmouseover='over(this)' onmouseout='out(this)'>请把鼠标放上去div>

<script>
    function over(obj) {
      
        obj.innerHTML = "麻烦把鼠标放下去";
    }
    function out(obj) {
      
        obj.innerHTML = "麻烦把鼠标放上去";
    }
script>
body>
html>

你可能感兴趣的:(JavaScript,javascript)