你不需要 jQuery。
您可以使用screen.width,它适用于所有浏览器:
if (screen.width <= 1024) window.location.replace("http://www.example.com/1024.html")
else window.location.replace("http://www.example.com/index.html")
Run Code Online (Sandbox Code Playgroud)
请参阅http://www.dynamicdrive.com/dynamicindex9/info3.htm
| 归档时间: |
|
| 查看次数: |
10153 次 |
| 最近记录: |