4.2 屬性(Attributes)的操控
.attr():取得屬性值與修改
取得屬性 id 的屬性值:
將屬性 id 的屬性值設定成 another_id:
一次設定多個屬性:
或:
範例:
.removeAttr():移除屬性
移除 style 屬性:
範例:
Last updated
取得屬性 id 的屬性值:
將屬性 id 的屬性值設定成 another_id:
一次設定多個屬性:
或:
範例:
移除 style 屬性:
範例:
Last updated