<mce:script language="javascript" type="text/javascript"><!-- //做遮罩层覆盖页面,获取页面的高度和宽度 var relWidth; //页面宽度 var relHeight;//页面高度 if (document.documentElement && document.documentElement.clientHeight) { var doc = document.documentElement; relWidth = (doc.clientWidth > doc.scrollWidth) ? doc.clientWidth - 1 : doc.scrollWidth; relHeight = (doc.clientHeight > doc.scrollHeight) ? doc.clientHeight : doc.scrollHeight; } else { var doc = document.body; relWidth = (window.innerWidth > doc.scrollWidth) ? window.innerWidth : doc.scrollWidth; relHeight = (window.innerHeight > doc.scrollHeight) ? window.innerHeight : doc.scrollHeight; } alert(relWidth+";"+relHeight); // --></mce:script>