求大神告知如何在鼠标移开后如何将内容变成未点击时的内容,代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.cla-B{
background: yellowgreen;
width: 300px; height: 40px;
text-align: center;
line-height: 40px;
}
</style>
<script type="text/javascript">
function operD(a){
setInterval(operD,1000);
document.getElementById("div-A").innerHTML=new Date().toLocaleString()
}
function operE(b){
}
</script>
</head>
<body>
<div class="cla-B" onmouseover="operD(this)" id="div-A" onmouseout="operE(this)">一只特例独行的猪</div>
</body>
</html>