js中for循環(huán)問題
if (trigger && length > 0) {
?? ?trigger.onclick = function() {
?? ??? ?for (var index = 0; index < length; index += 1) {
?? ??? ??? ?buttons[index].style["cssFloat" in trigger.style? "cssFloat": "styleFloat"] = "left";
?? ??? ?}
?? ?};
}
for循環(huán)這里 ; index += 1這么寫有啥目的,平時(shí)我們寫的不都是index++么
2015-10-08
一樣的意思 只是簡寫而已
2015-10-07
都一樣的,寫法不同而已