【发布时间】:2015-11-15 20:03:54
【问题描述】:
我有以下脚本用于确定访问页面的设备的屏幕宽度。这适用于所有浏览器,除了即有没有人有任何想法如何或为什么不工作?
function view() {
var isMobile = window.matchMedia("only screen and (max-width: 760px)");
if (isMobile.matches) {
//Do Nothing
}
else
{
horizontalview();
}
}
【问题讨论】:
标签: javascript css width screen explorer