请问各位大侠哥哥 如何固定设置一个页面最小宽度后,使得满屏浏览器大小无法被鼠标拖动而改变大小
就是要求浏览器缩放到设置的最小宽度和高度,就不能再缩放了。不想全部缩放的原因,就是保留主要菜单不能缩放,浏览器缩放到最小就是设置好的菜单宽度,要把菜单显示给用户看
就是要求浏览器缩放到设置的最小宽度和高度,就不能再缩放了。不想全部缩放的原因,就是保留主要菜单不能缩放,浏览器缩放到最小就是设置好的菜单宽度,要把菜单显示给用户看
<head runat="server"> <style type="text/css">
body
{
margin: 0px;
width: 100%;
height: 100%;
overflow: auto;
border-bottom-style: none;
border-top-style: none;
border-left-style: none;
border-right-style: none;
scrollbar-face-color: #F9F9F9;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: Silver;
scrollbar-3dlight-color: #999999;
scrollbar-arrow-color: #999999;
scrollbar-track-color: #FFFFFF;
scrollbar-darkshadow-color: #FFFFFF;
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#EFEFEF);
} </style>
<meta http-equiv="Content-Type " content= "text/html; charset=gb2312"> </head>
<frameset rows="67,*,25" cols="*" framespacing="0" frameborder="no" border="0">
<frame src="about:blank" name="topFrame" id="topFrame" scrolling="No" noresize="noresize" />
<frameset cols="193,8,*" rows="*" id="ContentFrame" onload="" frameborder="no" border="0" framespacing="0" >
<frame src="left.aspx" name="leftFrame" id="leftFrame" scrolling="No" noresize="noresize" />
<frame src="switch.html" name="switch" id="switch" scrolling="No" noresize="noresize" />
<frame src="News.aspx" name="mainFrame" id="mainFrame" scrolling="yes" runat="server" marginheight="0" marginwidth="0" noresize="noresize" />
</frameset>
<frame src="Foot.aspx" noresize="noresize" name="footFrame" scrolling="No" marginheight="0" marginwidth="0"frameborder="0" id="footFrame"/>
<noframes>
<body>
<form id="form1" runat="server">
<div>
对不起你的浏览器不支持框架
</div>
</form>
</body>
</noframes>
</frameset>
</html>大侠哥哥,我是想改变Index(首页)满屏浏览器设置大小,无法被鼠标拖动而再缩小窗体
function test()
{
window.resizeTo(832, 832); //一样到这里拒绝访问
}
window.onresize = test;
</script>上面这个 js可以设置浏览器高度和宽度,请问各位大侠哥哥哪个事件能触发鼠标拖动浏览器事件
window.onresize就可以啊.你这里就写的对的.
//设置一个页面的大小,就是宽和高,使得浏览器大小无法被鼠标拖动而改变大小
function test()
{ if(document.body.clientWidth<=1024){
window.resizeTo(1024, 689); //一样到这里拒绝访问
return true;
}else {
return false;
}
}
window.onresize = test;
</script>上面这个搞定