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
|
No comments:
Post a Comment