0

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

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

不起作用并在 Internet Explorer 移动设备中返回为 undefinedxundefined。

4

1 回答 1

1

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

document.body.clientWidth

于 2012-06-30T12:42:53.283 回答