Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="versionofbrowser()">
<div id="test"></div>
<script>
function versionofbrowser() {
if((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true ))
{
document.getElementById("test").innerHTML = 'IE';
}
else if(navigator.appVersion.indexOf('Edge') > -1)
{
document.getElementById("test").innerHTML= 'Edge';
}
else if(navigator.userAgent.toLowerCase().indexOf("op") > -1)
{
document.getElementById("test").innerHTML= 'Opera';
}
else if(navigator.userAgent.indexOf("Chrome") != -1)
{
document.getElementById("test").innerHTML = 'Chrome';
}
else if(navigator.userAgent.indexOf("Firefox") != -1 )
{
document.getElementById("test").innerHTML = 'Firefox';
}
else if(navigator.userAgent.indexOf("Safari") != -1)
{
document.getElementById("test").innerHTML = 'Safari';
}
else
{
document.getElementById("test").innerHTML = 'unknown';
}
}
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.9K 508