I have this code:
<body onload="detect(navigator.appName)">
<h2 id=alert>This tutorial is for Google Chrome users,
why would you want to read it?</h2>
</body>
<script>
function detect(x){
alert(x)
if (x != "Chrome"){
document.getElementById("alert").style.display = '';
}
}
</script>
The problem is, whenever I open the page using Google Chrome, It returns "Netscape". Is there a workaround?