<a href='javascript: window.alert("hello world!");'>Click here</a>


In IE 5.5, clicking this link will cause the window.onbeforeunload() event to
fire. Is this a bug? Is there any workaround?

According to MSDN, the onbeforeunload event should fire only if the <A> "refers
the browser to another Web page".

-- Matthew Solnit