0 Members and 2 Guests are viewing this topic.
<div id="chrome">You have chrome!</div><div id="nochrome">You don't have chrome =\</div><script type="text/javascript"> if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { document.removeChild(document.getElementById("nochrome")); } else { document.removeChild(document.getElementById("chrome")); }</script>
Guys, don't you only need to use the CDATA tag when the page is in XHTML?
it outputs this in chrome and firefox:You have chrome!You don't have chrome =\
<div id="chrome">You have chrome!</div><div id="nochrome">You don't have chrome =\</div><script type="text/javascript"> if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { document.body.removeChild(document.getElementById("nochrome")); } else { document.body.removeChild(document.getElementById("chrome")); }</script>