브라우져 X 누를때의 특정작업을 수행 해야 했기에, 아래 코드를 삽입 하였다.
크롬, 파이어폭스, 익스플로러 에서는 확인이 되었다.
덕분에 NPRuntime 안써도 될거 같다..아직까지는..
##################################################################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Window Close Alert and Feedback</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY>
Close the window...
<FORM name='feedback' action='myfile.php'>
<input type='hidden' value='' name='talk'>
</FORM>
<SCRIPT type='text/javascript'>
function exitAlert()
{
var quitReason='';
for(var i=0; i<arguments.length && arguments[i]!=false; i++)
;
if(i==arguments.length)
quitReason=prompt("Please tell us why you are abandoning this page?","It\'s garbage.");
if(typeof quitReason != 'string')
quitReason='';
else
if(quitReason.length>0)
{
document.forms.feedback.talk.value=quitReason.replace(/\s/g,"_");
document.forms.feedback.submit();
}
return quitReason;
}
window.onbeforeunload = function(evt)
{
if (typeof evt == 'undefined')
evt = window.event;
var response=exitAlert(true,true); /*To activate prompt, all parameters (if any) must evaluate true.*/
if(evt)
evt.returnValue = response;
document.forms.feedback.submit();
}
</SCRIPT>
</BODY>
</HTML>
##################################################################