Confirm box when browser/Tag close button clicks
<p>I have created my website for this I like to create confirm box when user clicks browser close button.....</p>

<p>So i created my coding as </p>

<pre><code>window.onbeforeunload = bunload;
    function bunload() {
        dontleave = "Are you sure you want to leave?";
        return dontleave;
            }
</code></pre>

<p>By this coding I got confirm box for each and every time when browser get loading.....I need confirm box when user only clicks browser close button......</p>

<p>Can anyone give me a idea  </p>
