您還可以從HTML元素中刪除屬性。
removeAttr()方法用于刪除元素的任何屬性。
在下面的示例中,我們刪除了表的邊框和類屬性:
$("table").removeAttr("border"); $("table").removeAttr("class");
$("").("");