CSS布局中可以用javascript判断浏览器版本
发布时间:2016-12-08 07:01:37 所属栏目:百科 来源:站长网
导读:ifnbsp;(window.XMLHttpRequest)nbsp;{nbsp;//Mozilla,nbsp;Safari,...IE7nbsp; alert('Mozilla,nbsp;Safari,...IE7nbsp;'); if(!window.ActiveXObject){nbsp;//nbsp;Mozilla,nbsp;Safari,... alert('Mozilla,nbsp;Safari'); }nbsp;elsenbsp;{ alert('IE7')
ifnbsp;(window.XMLHttpRequest)nbsp;{nbsp;//Mozilla,nbsp;Safari,...IE7nbsp; alert('Mozilla,nbsp;Safari,...IE7nbsp;'); if(!window.ActiveXObject){nbsp;//nbsp;Mozilla,nbsp;Safari,... alert('Mozilla,nbsp;Safari'); }nbsp;elsenbsp;{ alert('IE7'); } }nbsp;elsenbsp;{ alert('IE6'); } 看看运行效果: [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] (编辑:PHP编程网 - 黄冈站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |