jquery判断浏览器和版本

var brow = $.browser;
var bInfo = "";
if(brow.msie) {bInfo="Microsoft Internet Explorer "+brow.version;}
if(brow.mozilla) {bInfo="Mozilla Firefox "+brow.version;}
if(brow.safari) {bInfo="Apple Safari "+brow.version;}
if(brow.opera) {bInfo="Opera "+brow.version;}
if(brow.chrome) {bInfo="Chrome "+brow.version;}
alert(bInfo);

posted @ 2012-12-11 11:18  七郎  Views(182)  Comments(0Edit  收藏  举报