CSSStyleDeclaration removeProperty () เมธอด
ตัวอย่าง
ลบคุณสมบัติสี:
var declaration = document.styleSheets[0].cssRules[0].style;
var
removedvalue = declaration.removeProperty("color");
alert(removedvalue);
ความหมายและการใช้งาน
removeProperty() วิธีการลบคุณสมบัติ CSS ที่ระบุออกจากบล็อกการประกาศ CSS
รองรับเบราว์เซอร์
Method | |||||
---|---|---|---|---|---|
removeProperty() | Yes | 9.0 | Yes | Yes | Yes |
ไวยากรณ์
object.removeProperty(propertyname)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
propertyname | Required. A String representing the name of the property to remove |
รายละเอียดทางเทคนิค
รุ่น DOM: | CSS Object Model |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงค่าเก่าของคุณสมบัติที่ถูกลบออก |
❮วัตถุ CSSStyleDeclaration