Javascript For Getting Details Of Visitors Browser
Hello, I want to get the java script which when used in your web page provide you the details about the web browser which it is using. Can anyone is having idea about it. If anyone is having such script or something logic then please reply with that to me.
Re: Javascript For Getting Details Of Visitors Browser
I think you may need to use the books below to get the solution for your problem:- Official Netscape Visual JavaScript
- JavaScript Programmer's Annotated Archives
- JavaScript for Dummies, 2nd Ed.
- Official Netscape JavaScript 1.2 Programmer’s Reference
- Learn Advanced JavaScript Programming
- Designing with JavaScript: A Guide for the Rest of Us
Re: Javascript For Getting Details Of Visitors Browser
If you are using the below script then you will get the Browser Name and Browser version from the script below:
Code:
<html>
<body>
<script type="text/javascript">
var br = navigator.appName;
var brversion = navigator.appVersion;
var versionofbrowser = parseFloat(brversion);
document.write("Browser name: "+ br);
document.write("---------------");
document.write("Browser version: "+ brversion);
</script>
</body>
</html>
Re: Javascript For Getting Details Of Visitors Browser
Hello, I am just learning JavaScript and think that you need to make use of different online tutorials for getting this problem solved. If you want to get solution about the the details of visitors browser then you must need to visit the websites which provides you script and all. Or you can make use of different books for getting the solution.
Re: Javascript For Getting Details Of Visitors Browser
I have got the solution for your script requirement. You just need to use the script below and it will provide you more details about the browser of user:
Code:
<html>
<body>
<script type="text/javascript">
document.write("<p>Name of the Browser: ");
document.write(navigator.appName + "</p>");
document.write("<p>Version of the Browser: ");
document.write(navigator.appVersion + "</p>");
document.write("<p>Code used in the Browser: ");
document.write(navigator.appCodeName + "</p>");
document.write("<p>Platform which is used by the browser: ");
document.write(navigator.platform + "</p>");
document.write("<p>Cookies enabled or not: ");
document.write(navigator.cookieEnabled + "</p>");
</script>
</body>
</html>
Re: Javascript For Getting Details Of Visitors Browser
If you want to write javascript for getting details of Visitors Browser then you just need to use the properties of Navigator by providing dot in front of it. Navigator provides you following properties:
- appCodeName - For code name of browser.
- appName - Browser name
- appVersion - Browser Version
- cookieEnabled - cookie enabled or not
- language - Default language of Browser