KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to get the content of a <noscript> tag using Javascript. I succesfully managed to get it in FF, Chrome, Opera and even IE6 but fail on IE7 (haven't tried IE8+ yet). Basically, here's the reduced code version : <noscript>Lorem ipsum</noscript> <script> var noscript = document.getElementsByTagName('noscript')[0]; noscript.textContent; // undefined noscript.innerHTML; // empty string noscript.childNodes.length; // 0 </script> I tried adding element inside and targeting them, no success. I tried to wrap in a parent element and getting its .innerHTML , but anything between <noscript> tags is discarded. Note : I'm building a lazyloader script and the <noscript> element is just what I need ( <img> src attributes inside a <noscript> tag are not fetched by the browser.)
Tags (comma-separated)
Save Edits
Cancel