如何使用jQuery或其他简单方式来检测移动浏览器? [英] How to detect mobile browser using jQuery or in some other SIMPLE way..?

查看:86
本文介绍了如何使用jQuery或其他简单方式来检测移动浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
在jQuery中检测手持设备的最佳方法

Possible Duplicate:
best way to detect handheld device in jQuery

我想制作我的Web应用程序的移动版本.我如何运行一个功能,该功能可以检测是从桌面浏览器还是移动浏览器发出请求?

I want to make a mobile version of my web app. How I can run a function that will detect if a request is being made from a desktop or mobile browser?

因此,如果用户从移动浏览器中请求并单击链接,而不是转到实际页面,则该页面应被劫持并执行其他事件.

This is so that if the user is requesting from a mobile browser and they click on a link, rather than go to the actual page, it should get hijacked and do some other event..

先谢谢了.

推荐答案

检测移动浏览器上有一些脚本在服务器端或使用JavaScript或jQuery重定向移动访问者.

There are a few scripts on Detect Mobile Browser that redirect mobile visitors on the server side or with JavaScript or jQuery.

这篇关于如何使用jQuery或其他简单方式来检测移动浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆