博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JS判断客户端是否是iOS或者Android手机移动端
阅读量:6942 次
发布时间:2019-06-27

本文共 437 字,大约阅读时间需要 1 分钟。

hot3.png

 

 

js 判断iPhone|iPad|iPod|iOS|Android客户端

if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {    //alert(navigator.userAgent);      window.location.href ="iPhone.html";} else if (/(Android)/i.test(navigator.userAgent)) {    //alert(navigator.userAgent);     window.location.href ="Android.html";} else {    window.location.href ="pc.html";};

http://www.fufuok.com/JS-iphone-android.html

转载于:https://my.oschina.net/u/2395167/blog/755611

你可能感兴趣的文章
linux mysql 5.1 开启远程连接
查看>>
Exchange Server2010 升级至Exchange Server 2016--01(知识点)
查看>>
Linux如何统计进程的CPU利用率
查看>>
世界那么大,要不来看看?
查看>>
用递归方法对二叉树进行层次遍历
查看>>
Git分支管理策略
查看>>
mysql三范式
查看>>
hdu2048
查看>>
第一次写简历
查看>>
linux/centos/redhat 安装mono环境 X64系统
查看>>
Servlet,Filter,Listener,Interceptor的作用和区别
查看>>
学习 Message(4): 通过 Application.OnMessage 或 TApplicationEvents 响应消息
查看>>
HTML 学习 form 表单操作
查看>>
注册51cto博客的第一天
查看>>
CSS字体样式的缩写
查看>>
linux视频教程之vsftp_A
查看>>
LAMP平台部署及应用
查看>>
查看服务器RAID卡信息的SHELL脚本和命令介绍
查看>>
javascript基础函数
查看>>
Windows平台分布式架构实践 - 负载均衡
查看>>