為什么.css( propertyName, function )這種形式下的那個function的參數(shù)要有一個index和value? css("width",function(index,value){ ... })
為什么.css( propertyName, function )這種形式下的那個function的參數(shù)要有一個index和value? css("width",function(index,value){ ? ?... })
為什么.css( propertyName, function )這種形式下的那個function的參數(shù)要有一個index和value? css("width",function(index,value){ ? ?... })
舉報
2016-08-21
index為元素在對象集合中的索引位置(第一個元素的index對應(yīng)為0,第二個元素的index對應(yīng)為1。。。以此類推),value是原先的屬性值。