<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>js重温</title>
</head>
<div id="sss" onmouseover = "over()" onmouseout="out()"
style="width:100px;height:100px;color:red;background-color: green;color:red">鼠标不 在上面
</div>
</body>
<script>
function over(){
var x = document.getElementById("sss").innerHTML="鼠标在上面的样子";
var x = document.getElementById("sss").style.color="pink";
var x = document.getElementById("sss").style.backgroundColor="dodgerblue";
}
function out(){
var x = document.getElementById("sss").innerHTML="鼠标不在上面";
var x = document.getElementById("sss").style.color="red";
var x = document.getElementById("sss").style.backgroundColor="green";
}
</script>
</html>