Phương thức CSSStyleDeclaration RemoveProperty()
❮ Đối tượng CSSStyleDeclaration
Ví dụ
Xóa thuộc tính màu:
var declaration = document.styleSheets[0].cssRules[0].style;
var
removedvalue = declaration.removeProperty("color");
alert(removedvalue);
Hãy tự mình thử »Sự miêu tả
Phương thức RemoveProperty() loại bỏ thuộc tính CSS đã chỉ định khỏi khối khai báo CSS.
Hỗ trợ trình duyệt
Method | |||||
---|---|---|---|---|---|
removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
Cú pháp
object .removeProperty( propertyname )
Giá trị tham số
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to remove |
Chi tiết kỹ thuật
Phiên bản DOM: | Mô hình đối tượng CSS |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị giá trị cũ của thuộc tính đã bị xóa |
❮ Đối tượng CSSStyleDeclaration