繁体   English   中英

window.innerWidth不适用于Internet Explorer Windows Mobile

[英]window.innerWidth won't work with internet explorer windows mobile

所以我只是想输出文档的当前视口

$('#dimensions').text(window.innerWidth + 'x' + window.innerWidth);

不起作用,并在Internet Explorer Mobile中以undefinedxundefined的形式返回。

找到了答案,我不应该一直在寻找“ windows mobile”,而只是寻找普通的Internet Explorer:

document.body.clientWidth

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM