學習zepto.js(對象方法)[3]

繼續說zepto裏attributes的相關操作. attr,removeAttr,prop這三個方法. attr(): 三種用途 get: 返回值爲一個string字符串 $("<span id="special"></span>").attr("id");//--> "special"  注意:只能返回對象中第一個節點的屬性值 set: 返回值爲一個zepto對象 $("<span>").at
相關文章
相關標籤/搜索