[問題] 關於Js的問題

看板Ajax作者 (★閃亮數學推理★)時間17年前 (2008/07/02 17:30), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
這是測試網頁 http://homepage.ntu.edu.tw/~r95222003/test2/test2.html 問題是用IE看的時候 當把底下要還原回去之時 編號不會從新編好 他會不動 看起來的原因是我去抓在下面那個div有幾個span的name叫top他沒去數 可是我用alert去測試 IE還是不理我 以下是當點了移到下面的圖時,他會使用的function function back(){ var originalSite = document.getElementById("imgbag"); var top = document.getElementsByName("top"); var count = 0; this.onclick = addpop5; var temp = this.parentNode; originalSite.appendChild(this); temp.parentNode.removeChild(temp); if(top.length ==0) { return; } var n=top.length; for (var i=0; i< n; i++) { count =count +1; top[i].firstChild.nodeValue=count; } } PS: Firefox 3.0是OK 我還沒試過其他的 IE 是可以回去,可是編號不對 謝謝撥冗來看的各位 -- Every thing can be wrong unless you can proof it is true. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.235
文章代碼(AID): #18QqhJzk (Ajax)
文章代碼(AID): #18QqhJzk (Ajax)