簡體   English   中英

使用 javascript 檢測用戶是否在移動設備上

[英]detecting if a user is on a mobile usin javascript

我有一個使用 swfobject 在 flash 中設計的網站,所以我有一個名為"flashcontent"div ,它環繞着我的網站。

When javascript is enabled, the flash website is shown, i also have an alternative for when javascript is disabled or not available, in that case i see a html site, now my question is:

我如何檢測用戶何時使用手機,因此它使用 html 站點和單獨的mobile.css與移動版本一起使用?

如果您使用的是 PHP 這可能會有所幫助http://detectmobilebrowsers.mobi/

如果您使用的是 Javascript 試試這個: http://www.hand-interactive.com/resources/detect-mobile-javascript.htm

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM