IE prompt about unsaved form data
I'm having an unexpected "annoying" popup in IE7 (and possibly other v开发者_Python百科ersions). As expected IE prompts you about unsaved form data when closing the window which is fine. But I have a form inside a div and now when I toggle the display CSS style between none and block, IE thinks I'm closing the form with unsaved data and shows the warning about closing an unsaved form! I don't want my users to be annoyed when simply hiding a form in my IE-based web app.
Anyone know how to overcome this?
Make sure that your doc type is transitional rather than strict
The prompt isn't IE's-- your HTML has an onbeforeunload handler which triggers the warning.
加载中,请稍侯......
精彩评论