删除属性

要从元素中删除属性,可以使用函数 .removeAttr(attributeName) 。例如:

$('#home').removeAttr('title');

这将从 ID 为 home 的元素中删除 title 属性。