javascript - disable Internet explorer close button - Stack Overflow

I have a requirement wherin the IE browser should be disabled from being closed when the ajax modal pop

I have a requirement wherin the IE browser should be disabled from being closed when the ajax modal popup is shown inside the page for a buisness need.Kindly let us know the feasability for the same or options to resolve the needs.

I have a requirement wherin the IE browser should be disabled from being closed when the ajax modal popup is shown inside the page for a buisness need.Kindly let us know the feasability for the same or options to resolve the needs.

Share Improve this question edited Apr 3, 2013 at 7:36 Guru Kara 6,4823 gold badges40 silver badges51 bronze badges asked Apr 3, 2013 at 7:34 user2239309user2239309 111 silver badge2 bronze badges 2
  • 2 Would'nt that be great for spammers, if you could just disable closing the browser. Not annoying at all. This is of course not possible for obvious reasons. – adeneo Commented Apr 3, 2013 at 7:37
  • ".Kindly let us know the feasability for the same or options to resolve the needs." - you want something, you should show research effort for it. Search "kiosk mode". – CodeCaster Commented Apr 3, 2013 at 7:45
Add a ment  | 

2 Answers 2

Reset to default 3

It's NOT POSSIBLE to disable close button in any of the modern browsers.

If all that you are looking for is to keep users in your page, then i would suggest using the window.onbeforeunload JavaScript event

window.onbeforeunload = function(){ return 'Do you want to leave ?';}

It's supported in all major browsers by asking users a question as to whether they want to leave in the middle of a critical operation.

Here is a reference article to get you startedUsing the OnBeforeUnload JavaScript Event

You can not disable the browser's close button , but yes you can capture the browser's close button with the help of Jquery

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

相关推荐

  • javascript - disable Internet explorer close button - Stack Overflow

    I have a requirement wherin the IE browser should be disabled from being closed when the ajax modal pop

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信