I am trying to rewrite a tag using Javascript. The code looks like this
<div id="captcha" style="display: none;">
[content]
</div>
So I am trying to rewrite the entite tag so it removes the styling
"style="display:none;"
From the tag on pageload. I already have this code, but I cannot seem to get it to work:
var divv = document.getElementById("captcha");
divv.innerHTML = divv.innerHTML.replace("style="display: none;", "");
divv.style.display='';?styleattribute is not part ofinnerHTMLof#captcha, rather it's part ofouterHTML.