最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機立即綁定

加上remove后失效,注釋掉remove又可以了,為什么,大神們幫幫忙

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<link rel="stylesheet" type="text/css" href="css/style.css">

</head>

<body>

<div id="div">


</div>

<script type="text/javascript">

window.onload=function(){

var oDiv=document.getElementById("div");

oDiv.onmouseover=function(){


startMove();

}

oDiv.onmouseout=function(){


reMove();

}


}

var timer=null;

function startMove(){

clearInterval(timer);

? ? ? ? ? ?var oDiv=document.getElementById("div");

? ? ? ? ? ?

? ? ? ? ? ?timer=setInterval(function(){

? ? ? ? ? ? if (oDiv.offsetLeft==500) {

? ? ? ? ? ? clearInterval(timer);

? ? ? ? ? ? }?

? ? ? ? ? ? else {

? ? ? ? ? ? oDiv.style.left=oDiv.offsetLeft+1+"px";

? ? ? ? ? ? }

?

? ? ? ? ? ? },10)

? ? ? ? function reMove(){

clearInterval(timer);

? ? ? ? ? ?var oDiv=document.getElementById("div");

? ? ? ? ? ?

? ? ? ? ? ?timer=setInterval(function(){

? ? ? ? ? ? if (oDiv.offsetLeft==0) {

? ? ? ? ? ? clearInterval(timer);

? ? ? ? ? ? }?

? ? ? ? ? ? else {

? ? ? ? ? ? oDiv.style.left=oDiv.offsetLeft-1+"px";

? ? ? ? ? ? }

?

? ? ? ? ? ? },10)

? ? ? ? ? ??

}

</script>

</body>

</html>


正在回答

1 回答

在瀏覽器里用F12調(diào)試之后發(fā)現(xiàn)你在?startMove()這個函數(shù)處少寫了“ } ”。38行后面。

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
JS動畫效果
  • 參與學(xué)習(xí)       113911    人
  • 解答問題       1502    個

通過本課程JS動畫的學(xué)習(xí),從簡單動畫開始,逐步深入各種動畫框架封裝

進入課程

加上remove后失效,注釋掉remove又可以了,為什么,大神們幫幫忙

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號