This snippet shows (replacement) content for users without Javascript, similar to the <noscript>
tag.
<SCRIPT> document.write('<style type="text/css">#no_js{display:none;}</style>'); </SCRIPT>
<TAG id="no_js"> Content for users without Javascript </TAG>
<SCRIPT> var x=document.getElementById("no_js");x.parentNode.removeChild(x); </SCRIPT>
- Line 1 hides the Content of line 2 with CSS.
- Line 3 additionally removes the content - for Browsers without CSS but with Javascript.
I wonder whether line 3 is academic and can be left out.
Are there real world users around with no CSS but Javascript ?
Related posts: