最新回答 / 修遠道
var newLeft=parseInt(list.style.left)+offset;這句話錯了,應該是var newLeft=parseInt(list.style.left)+offset+'px';這里應用的是字符拼接,如果沒有px,你調用函數時實參就不對
2015-03-10
最新回答 / 釋淨靈_南無阿彌陀佛
<...code...>span是標籤名,要用getElementsByTagName獲取喔~~var button = document.getElementById('button').getElementsByTagName('span');
2015-02-15
最新回答 / VincentLi
for (var i = 0; i < buttons.length; i++) {? ? ? ? ? ? ? ? buttons[i].onclick = function(){? ? ? ? ? ? ? ? ? ? if (this.className == 'on') {? ? ? ? ? ? ? ? ? ? ? ? return;? ? ? ? ? ? ? ? ? ? }? ? ? ? ? ? ? ? ? ? var myIndex = this.getAttribute('index');...
2015-02-15