我为什么到这里都不能动啊,来救救小白啊
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>js运算符</title>
<style type ="text/css">
body,div,span{ margin:0;
padding:0;}
.main{width:200px; height: 200px; background:blue;
position: relative;
left:-200px;
top:0;
}
span{
width:20px;
height:40px;
position:absolute;
left:200px;
top:80px;
background-color:red;
}
</style>
</head>
<body>
<div><span>分享</span></div>
<script type="text/javascript">
window.onload = function(){
var oDiv = document.getElementById('main');
oDiv.onmouseover = function(){
startMove();
};
}
function startMove(){
var oDiv =document.getElementById('main');
setInterval(function(){
oDiv.style.left = oDiv.offseLeft+10+'px';
},30)
}
</script>
</body>
</html>