var resizeTimer = null;
function doResize(){
var url = '${ctx}/aa/monitor/alar/recharge.jsp';
window.location.href = url;
//alert("width="+document.documentElement.clientWidth + " Height="+document.documentElement.clientHeight);
}
window.onresize = function(){
if(resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout("doResize()",0);
}
window.onresize = function()
{
var url = '${ctx}/bomc3/monitor/alar/recharge.jsp';
window.location.href = url;
};
另外获取宽高:
document.documentElement.clientWidth
parent.document.body.clientWidth