View Single Post
Old 08-02-2015, 03:44 PM  
Video-Post
Selling short ICQ numbers
 
Video-Post's Avatar
 
Industry Role:
Join Date: Dec 2001
Location: NL
Posts: 1,118
Quote:
Originally Posted by Video-Post View Post
Well, here you go - put this between the HEAD and BODY tags:

Code:
<script>
function myFunction() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))
document.getElementById("brchk").innerHTML = "<!-- two three four -->";
else                 
document.getElementById("brchk").innerHTML = "<!-- one two three four -->";
}
</script>

Then insert this in the body tag to trigger the function above once:

Code:
<body onload="myFunction()">

Finally, put this between the HTML tags in your document:

Code:
<span id="brchk"><!-- lets check --><span>
Sorry, small change - put the first code between the head tags instead of between the HEAD and BODY tags. It should work anyway but better stick to the norm.

Video-Post is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote