判断是什么浏览器
2016-12-28 18:44
393 查看
<script language="JavaScript" type="text/javascript"> if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){ alert('你是使用IE') } else if (navigator.userAgent.indexOf('Firefox') >= 0){ alert('你是使用Firefox') } else if (navigator.userAgent.indexOf('Opera') >= 0){ alert('你是使用Opera') }else{ alert('你是使用其他的浏览器浏览网页!') } </script>
相关文章推荐
- PhxSQL使用及部署——替换druid metadata使用的mysql
- eclipse、myeclipse 反编译插件 轻松查看源代码
- JavaIO 文件递归遍历及常用File类操作
- Java 单例模式
- yum update时候出现Another app is currently holding the yum lock解决方法
- Android中的ViewRootImpl类源码解析
- Android 图片压缩的那些事
- oracle注解生成整形主键策略
- open,write,read函数
- mongodb 内嵌数组 操作符 $slice 用法
- eclipse 导入代码风格.xml 文件
- 汇编语言 写 Hello World
- BZOJ 2938: [Poi2000]病毒 AC自动机
- Linux centos 7下: 用 C 语言连接 MySQL数据库
- ListView的优化
- 滚动条位置判断
- ipython notebook使用教程
- 微信分享打不开分享界面
- eclipse总是卡在building workspace的解决方法:
- 回溯法-素数环问题