怎么获取手机屏幕分辨率啊,求助。api里也不知道该用哪个,纠结。。。
好摄之徒
- 发布:2014-09-19 17:35
- 更新:2014-09-20 20:08
- 阅读:3372
怎么获取手机屏幕分辨率啊,求助
分类:HTML5+
2 个回复
Wemyss
var osName = plus.os.name;
var screenWidth = plus.screen.resolutionWidth;
var screenHeight = plus.screen.resolutionHeight;
var screenWidthDpi = screenWidth plus.screen.scale;
var screenHeightDpi = screenHeight plus.screen.scale;
Wemyss
当然,必须在plusready之后