当前位置:网站首页>js to determine whether it is a pc or a mobile terminal (including ipad)
js to determine whether it is a pc or a mobile terminal (including ipad)
2022-08-01 15:02:00 【Five Queens】
vaildatePc = function() {const userAgentInfo = navigator.userAgent;const Agents = ["Android", "iPhone","SymbianOS", "Windows Phone","iPad", "iPod"];let flag = true;for (var v = 0; v < Agents.length; v++) {if (userAgentInfo.indexOf(Agents[v]) > 0) {flag = false;break;}}return flag;}true means pc, false means mobile
边栏推荐
猜你喜欢
随机推荐
请问下怎么取数据库中上一个小时的数据到odps进行实时节点的同步呢
Grafana9.0发布,Prometheus和Loki查询生成器、全新导航、热图面板等新功能!
荣信文化通过注册:年营收3.8亿 王艺桦夫妇为实控人
强网杯2022 pwn 赛题解析——yakagame
urlopen error errno111(英雄联盟报错error)
2022-08-01日报:18张图,直观理解神经网络、流形和拓扑
VIM使用指南(7)单词移动/删除技巧
The default database main key, foreign key, and the only key index
SQL查询数据以及排序
gconf/dconf实战编程(3)利用dconf库读写配置实战以及诸多配套工具演示
阿里巴巴测试开发岗P6面试题
反序列化漏洞详解
接口测试框架开发实践5:配置文件读取
MySQL中字符串比较大小(日期字符串比较问题)
兆骑科创平台招才引智,海内外高层次人才引进平台
what is tail tooth feast
如何使用 Mashup 技术在 SAP Cloud for Customer 页面嵌入自定义 UI
股票策略02 | 技术择时+行业因子+市值轮动
Performance Optimization - Rendering Optimization Notes
tkinter-TinUI-xml实战(6)问卷









