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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -