当前位置:网站首页>The PC side determines the type of browser currently in use
The PC side determines the type of browser currently in use
2022-07-31 01:38:00 【Fansr_】
function getOpera() {var userAgent = navigator.userAgent; //Get the browser's userAgent stringif (userAgent.indexOf("Opera") > -1) {/ / Determine whether the Opera browserreturn "Opera";}if (userAgent.indexOf("Firefox") > -1) {/ / Determine whether the Firefox browserreturn "FF";}if (userAgent.indexOf("Chrome") > -1) {/ / Determine whether the Chrome browserreturn "Chrome";}if (userAgent.indexOf("Safari") > -1) {/ / Determine whether the Safari browserreturn "Safari";}if (userAgent.indexOf("compatible") > -1 &&userAgent.indexOf("MSIE") > -1 &&!isOpera) {/ / Determine whether the IE browserreturn "IE";}},
边栏推荐
- MySql的安装配置超详细教程与简单的建库建表方法
- I have been working in software testing for 3 years, how did I go from just getting started to automated testing?
- Centos 7.9安装PostgreSQL14.4步骤
- 进程间通信学习笔记
- 【genius_platform软件平台开发】第七十四讲:window环境下的静态库和动态库的一些使用方法(VC环境)
- Mysql:Invalid default value for TIMESTAMP
- Gateway路由的配置方式
- What is the ideal college life?
- ROS Action通信
- TiDB 在多点数字化零售场景下的应用
猜你喜欢
4G通信模块CAT1和CAT4的区别
C语言_结构体指针数组函数选票系统
I have been working in software testing for 3 years, how did I go from just getting started to automated testing?
GCC Rust is approved to be included in the mainline code base, or will meet you in GCC 13
tkinter模块高级操作(二)—— 界面切换效果、立体阴影字效果及gif动图的实现
rpm安装postgresql12
Set the browser scrollbar style
一个无经验的大学毕业生,可以转行做软件测试吗?我的真实案例
太阳能板最大面积 od js
Centos 7.9 install PostgreSQL14.4 steps
随机推荐
pc端判断当前使用浏览器类型
倍增、DFS序
太阳能板最大面积 od js
MySQL stored procedure
87. Convert String to Integer
kotlin中函数作为参数和函数作为返回值实例练习
蓝牙mesh系统开发二 mesh节点开发
C语言_结构体指针数组函数选票系统
华为od 转骰子 js
Dispatch Center xxl-Job
link与@import的区别
System design. Short chain system design
Kyushu cloud as cloud computing standardization excellent member unit
.NET 跨平台应用开发动手教程 |用 Uno Platform 构建一个 Kanban-style Todo App
【genius_platform软件平台开发】第七十四讲:window环境下的静态库和动态库的一些使用方法(VC环境)
关于Redis相关内容的基础学习
力扣每日一题-第46天-704. 二分查找
ECCV 2022 华科&ETH提出首个用于伪装实例分割的一阶段Transformer的框架OSFormer!代码已开源!
24. Please talk about the advantages and disadvantages of the singleton pattern, precautions, usage scenarios
Fiddler抓包模拟弱网络环境测试