1
qdvictory 2014-05-09 11:50:16 +08:00
是判断ip还是判断页面高度?
|
2
luo123qiu 2014-05-09 11:55:24 +08:00
根据窗口高度来判断吧。
|
3
jsonline 2014-05-09 11:57:05 +08:00 via Android
iPhone 负4?
|
4
NemoAlex 2014-05-09 12:00:03 +08:00
navigator.userAgent
iPhone 4 和 5 这个有区别么? |
5
jiangpeng 2014-05-09 12:10:00 +08:00
userAgent 只会知道是 iPhone 还是 iPad,还是得窗口高度啊
|
6
kamal 2014-05-09 12:40:21 +08:00
iPhone 4 UA
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7 iPhone 5 UA Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 iPhone OS 4_0 iPhone OS 5_0 |
8
kamal 2014-05-09 12:59:56 +08:00 1
|
9
iamocean 2014-05-09 13:01:09 +08:00 1
window.screen.height > 480 ? iphone5 : iphone4;
|