用脚本检测手机而不是平板电脑

时间:2013-06-09 11:34:39

标签: javascript css html5

我想检测手机设备而不是平板电脑/台式机。 如果我发现手机,我会加载一个jquery移动网站。

这是来自这里的脚本,因为我不知道这是否也会在平板电脑上检测到移动浏览器。

http://detectmobilebrowsers.com/

我在这里查了一个帖子,提到了手机,但对平板电脑尺寸不太确定?What's the best way to detect whether the client is a tablet or a phone?

1 个答案:

答案 0 :(得分:1)

http://detectmobilebrowsers.com/似乎只检测到手机。我在两个不同的平板电脑上尝试过,并且说“没有检测到移动浏览器。”