Introduction:
In this article I will explain how to find or detect browser type, browser name, browser version in JQuery using asp.net.
In this article I will explain how to find or detect browser type, browser name, browser version in JQuery using asp.net.
Description:
In previous posts I explained jQuery move to particular div when click on link, how to find client machine IP using jquery in asp.nt, jQuery increase or decrease website font and many articles relating to JQuery. Now I will explain how to find or detect browser type and version using JQuery in asp.net. To implement this one we need to write the code as shown below
In previous posts I explained jQuery move to particular div when click on link, how to find client machine IP using jquery in asp.nt, jQuery increase or decrease website font and many articles relating to JQuery. Now I will explain how to find or detect browser type and version using JQuery in asp.net. To implement this one we need to write the code as shown below
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>jQuery Find or Detect
Browser Type in Asp.net</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<form id="form1" runat="server">
<table>
<tr><td> You Are Using Browser:</td>
<td><label id="lbltype" style=" font-size:xx-large; font-weight:bold"
/></td></tr>
<tr><td align="right">
Version:</td>
<td><label id="lblVersion" style=" font-size:xx-large; font-weight:bold"
/></td></tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
$('#lbltype').text(jQuery.uaMatch(navigator.userAgent).browser);
$('#lblVersion').text($.browser.version);
})
</script>
</form>
</body>
</html>
|
Live Demo
Check below output it will display your browser type and version of your browser
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
6 comments :
Not working in IE9
@Prasanth....
i tested in all the browsers. it's working fine. check your code....and for your information in IE it will display name like msie that mean microsoft internet explorer
Yes, Right, working when running on localhost. But its showing msie 7.0 on this page in Live Demo given by you !!
please how can i redirect mobile users from my site to mobile site?.
Demo link is not working
not working
Note: Only a member of this blog may post a comment.