当前位置:网站首页>JS determines whether the mobile terminal or the PC terminal
JS determines whether the mobile terminal or the PC terminal
2022-07-02 05:51:00 【Front end of brick moving】
js Judge whether the mobile terminal is pc End
function isMobile() {
let userAgentInfo = navigator.userAgent;
let Agents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
let getArr = Agents.filter(i => userAgentInfo.includes(i));
return getArr.length ? true : false;
}
Judge whether it is pc End
- true: Mobile
- false: pc End
边栏推荐
- DRM display framework as I understand it
- Visual Studio導入
- Common protocols and download paths of NR
- 【论文翻译】GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond
- PHP inner class name is the same as the inner class method name
- Reflection of the soul of the frame (important knowledge)
- PHP read file (read JSON file, convert to array)
- [leetcode] day92 container with the most water
- Brew install * failed, solution
- Youth training camp -- database operation project
猜你喜欢

all3dp.com网站中全部Arduino项目(2022.7.1)

Vscode paste image plugin saves image path settings

OLED12864 液晶屏

Cambrian was reduced by Paleozoic venture capital and Zhike shengxun: a total of more than 700million cash

Test case

Visual Studio導入

all3dp. All Arduino projects in com website (2022.7.1)
![[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP](/img/25/73f11ab2711ed2cc9f20bc7f9116b6.png)
[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP

Oled12864 LCD screen

深度学习分类网络--VGGNet
随机推荐
Pytorch Basics
Opencv LBP features
数理统计与机器学习
PHP read file (read JSON file, convert to array)
php读文件(读取json文件,转换为数组)
Zzuli:1062 greatest common divisor
PHP inner class name is the same as the inner class method name
Matplotlib double Y axis + adjust legend position
深度学习分类网络 -- AlexNet
《CGNF: CONDITIONAL GRAPH NEURAL FIELDS》阅读笔记
KMP idea and template code
[PHP是否安装了 SOAP 扩]对于php实现soap代理的一个常见问题:Class ‘SoapClient‘ not found in PHP的处理方法
PHP obtains some values in the string according to the specified characters, and reorganizes the remaining strings into a new array
TypeScript的泛型和泛型约束
数据挖掘方向研究生常用网站
File contains vulnerabilities (II)
Usage record of vector
Zzuli:1060 numbers in reverse order
Vite打包后的dist不能直接在浏览器打开吗
Record sentry's path of stepping on the pit