Prompt only when closing browser not when clicking save button or when navigating away from page using javascript?
<p>How to prompt when user typed something in the textbox and unknowingly close the browser?Also if the user doesn't type anything in the input field and if close the browser,the browser should close without prompting.Browser should prompt only if the user changed something in the field.If I use onbeforeunload event,it promts for everthing even when saving the page. Is there anyway to solve my problem in javascript.Please help by giving me apt codes.</p>
