admin管理员组文章数量:1426016
I have a problem that I want to disable the maximize button of the browser when we run our web application, means user can not maximize the same browser screen in which site is running. I don't know how it will be achieved? Please suggest me the right solution regarding the same.
Thanks in advance.
I have a problem that I want to disable the maximize button of the browser when we run our web application, means user can not maximize the same browser screen in which site is running. I don't know how it will be achieved? Please suggest me the right solution regarding the same.
Thanks in advance.
Share Improve this question asked Dec 7, 2011 at 6:27 Sanat PandeySanat Pandey 4,10317 gold badges77 silver badges135 bronze badges 1- 1 It's a better idea to make your site usable with the browser maximized. – tvanfosson Commented Dec 7, 2011 at 6:37
4 Answers
Reset to default 1By default, max button of a window is enabled, but if you open as pop-up and pass some value as the window property in that case the max button might be disabled, please see below way to do this job:
Set window resizable
property as either no
or 0
.
Format:
window.open("pageurl","PopupWindow","resizable=no"); //OR: resizable=0
Examples:
window.open("http://www.google.","PopupWindow","resizable=0");
window.open("http://domainname./somepage.ext","PopupWindow","resizable=0");
window.open("http://domainname./somepage.ext","PopupWindow","resizable=no");
You can re-load the window that way using window.open() (javascript)
<script>
function openWithoutResize(url,target) {
window.open(url,target,"resizable=0");
}
</script>
You'll need to open your target page in a popup window with the resizable attribute set to "no." This cannot be modified on the active page. You will be required to launch a popup window in order to disable maximize. For instance:
function onReady() {
window.open("http://www.contoso.","myWindow","resizable=no");
}
<body onresize="window.resizeTo(350,530)">
<form id="form1" runat="server">
</form>
</body>
本文标签: javascriptHow to disable the maximize button of browser in C aspnetStack Overflow
版权声明:本文标题:javascript - How to disable the maximize button of browser in C# asp.net - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745368686a2655635.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论