javascript - How to disable the maximize button of browser in C# asp.net - Stack Overflow

I have a problem that I want to disable the maximize button of the browser when we run our web applicat

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
Add a ment  | 

4 Answers 4

Reset to default 1

By 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>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745368686a4624699.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信