About deleting css Styles

recently, the write plug-in encountered such a problem

original dom

hello world

after adding css with JavaScript

<p style="color:-sharpFF0000">hello world

I want to achieve the effect that when I add styles dynamically and then delete them, I don"t think the color property is set to color:none; but delete the styles I added dynamically, restore them as they are, and do not affect the other attributes in style . I don"t know what the solution is

.

hello world

May.22,2021

< del > dom.style.color= "; < / del >

< hr >

2019.1.5 UPDATE

A more standardized method should be

dom.style.removeProperty("color");

Resources

CSSStyleDeclaration.removeProperty () | MDN


can't add classes with js, then delete class


write a class, to add to the element and delete the class when the class, is deleted.


delete dom.style.color should be fine.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8055-1e98.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8055-1e98.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?