哪出错了??

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>relative样式</title>
<style type="text/css">
div{

            width: 200px;

            height: 200px;

            background: red;

        }

   
</style>
<script type="text/javascript">
window.onload=function(){
 startMove();
}
function startMove(){
 setInterval(function(){
  var oDiv=document.getElementById("div1");
  oDiv.style.width=oDiv.offsetWidht-1+'px'
  
 }
 ,30)
}
</script>
</head>
<body>

 <div id="div1"></div>


</body>
</html>

 

慕先生0450854
浏览 1328回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript