返回值:jQueryremoveAttr(name)
概述
從每一個(gè)匹配的元素中刪除一個(gè)屬性
參數(shù)
nameString
要?jiǎng)h除的屬性名
示例
描述:
將文檔中圖像的src屬性刪除
HTML 代碼:
<img src="test.jpg"/>
jQuery 代碼:
$("img").removeAttr("src");
結(jié)果:
[ <img /> ]
?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben