//获取当前网页尺寸
function getClientSize()
{
let width=2*document.body.clientWidth;
let height=2*document.body.clientHeight;
egret.log('clientWidth:'+width,"clientHeight:"+height)
return [width,height];
}
因为是webView,所以我是这样取到了,PC上不用乘2,苹果手机上少一半所以乘2了,我也不知道为什么是少一半的,总之乘2就对了。