View Full Version : Browser detection
adam*
07-17-2002, 04:51 PM
I want a script that will only include an existing *.js in the <head> section of my page if the browser used to view the page is IE.
Help appreciated.
premshree
07-17-2002, 08:24 PM
<script language="JavaScript">
if(document.all&&navigator.userAgent.indexOf("Opera")==-1)
{
document.write('<scr' + 'ipt language="JavaScript"' + 'src=jsFile.js' + '</scr' + 'ipt');
}
</script>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.