![](/img/trans.png)
[英]What's the best way to detect a 'touch screen' device using JavaScript?
[英]What is the best way to detect mobile screen width using JavaScript
使用JavaScript檢查移動屏幕寬度的最佳方法是什么? 我已經嘗試過screen.width,但結果不一。
您可以在HandsetDetection.com上使用Javascript移動檢測方法。 創建沒有重定向規則的網站配置文件,並將檢測javascript嵌入頁面中。 然后,您可以直接從javascript訪問HandsetDetection.width和HandsetDetection.height變量以實現屏幕分辨率。
希望能有所幫助。
(免責聲明:我在那兒工作)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.