javascript - Detecting an html attribute's value with a userscript? -


i trying make myself personal user script, need detect html attribute's value. example:

<div id="a">stuff</div>     <div id="b" value="false"></div> 

how create if statement in script, triggers if "value" attribute of element b turns true?

element = document.getelementbyid("b");  if(element != null) {     if (element.value  == "true") {         //     }  } 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

ios - Segue not passing data between ViewControllers -

visual studio code - What does the isShellCommand property actually do and how should you use it? -