0 Members and 1 Guest are viewing this topic.
<script language="javascript" type="text/javascript">var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;if (is_chrome === true) { <p>this is HTML</p> <p> all fancy shmancy html code goes here.</p> }else { document.write("get chrome!"); }</script>
<script language="javascript" type="text/javascript">var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;if (is_chrome === true) { document.write("<p>this is HTML</p><p> all fancy shmancy html code goes here.</p>"); }else { document.write("get chrome!"); }</script>
err, what is CDATA? I'm (VERY) new to javascript to be honest. I wanted to learn enough just to make this work. Also what is DOM?
<script type="text/javascript">//<![CDATA[alert("Code goes here")//]]></script>
<script language="javascript" type="text/javascript">document.title=("Cell's Awesome Profile! :)")var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;if (is_chrome === true) {<script type="text/javascript">//<![CDATA[alert("<p>i has chrome yay</p>")//]]> }else { document.write("get chrome!"); }</script>
<script language="javascript" type="text/javascript"> //<![CDATA[document.title=("Cell's Awesome Profile! :)")var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;if (is_chrome === true) { document.print("<p>i has chrome yay</p>") }else { document.write("<p>get chrome!</p>"); }//]]></script>
<html><body><?php if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "chrome") > -1) { ?><!-- Chrome html here --><?php } else { ?><!-- Display error! --><?php } ?></body></html
You could use php...Code: [Select]<html><body><?php if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "chrome") > -1) { ?><!-- Chrome html here --><?php } else { ?><!-- Display error! --><?php } ?></body></html
<?php if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "chrome") > -1) { ?><!-- <p><font face="arial" size="24"><b>IM USING CHROME!!! </b></font></p> --><?php } else { ?><!-- <p>get chrome!</p> --><?php } ?>