会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
哈姆PP
博客园
首页
新随笔
联系
管理
订阅
2015年12月24日
js判断是否是移动端(触摸屏)或者是PC
摘要: js代码:console.log("ontouchstart" in window);手机web浏览器,chrome模拟手机、手机APP会返回true,pc端(非手机模拟状态下)返回false所以:一种事件的处理方法:var isTouch = ("ontouchstart" in window) ...
阅读全文
posted @ 2015-12-24 15:22 哈姆PP
阅读(2999)
评论(0)
推荐(0)
编辑
公告