jQuery获取操作系统和浏览器信息的插件应用
介绍一个jQuery插件Client OS/Browser detect,可以非常方便的获取操作系统和浏览器信息,使用方法如下.
使用说明
需要使用jQuery库文件和Client OS/Browser detect库文件[下载]
使用实例
一,包含文件部分
<script src=”jquery-1.3.2.js”></script>
<script src=”jquery.client.js”></script>
二,HTML部分
<div id=”os”></div>
<div id=”browser”></div>
三,Javascript部分
<script>
$(’#os’).html(”Your browser is running on: <b>” + $.client.os + “</b>”);
$(’#browser’).html(”Your browser is: <b>” + $.client.browser + “</b>”);
</script>
如上实例,直接使用$.client.os获取当前用户的操作系统,使用$.client.browser获取用户的浏览器信息,使用非常简单。
点我下载Client OS/Browser detect插件源程序
http://jquerycodes.googlecode.com/files/jquery.client.rar
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments
还没有评论。
发表评论