My New Hugo Site
Home
This Blog
All Tags
All Sections
All Posts
JQuery 屬性操作
Jul 30, 2013
1 min read
JQuery
J query
.attr()
取得或設定屬性
.removeAttr()
移除屬性
.prop()
取得或設定屬性
.removeProp()
移除屬性
.attr()和.prop()的差異在1.6版本 對於bool值的屬性,例如checked, disabled, readonly, selected...,用prop會比較合適
Sharing is caring!
Please enable JavaScript to view the
comments powered by Disqus.
Sharing is caring!