Hàm .removeAttr() trong jQuery

Lượt xem: 2684

Ví dụ:

Loại bỏ thuộc tính style trong tất cả thẻ

 

 

 

$("button").click(function(){
    $("p").removeAttr("style");
});

 

Cấu trúc

$(selector).removeAttr(attribute)

 

Có thể bạn quan tâm