请教:如何在窗口关闭的时候修改数据库?

如何在窗口关闭的时候修改数据库?
---------------------------------------------------------------

 1<script language="JavaScript">   
 2function submitFrm(){   
 3document.frmTab.submit();   
 4}   
 5function window::onbeforeunload(){   
 6if (event.clientY<0 && event.clientX>document.body.clientWidth-20 ¦ ¦ event.clientY<0 && event.clientX<20 ¦ ¦ event.altKey ¦ ¦ event.clientY>document.body.clientHeight) {   
 7if(confirm("是否保存数据?")) {   
 8submitFrm();   
 9window.showModalDialog("saving.htm","Nothing","dialogHeight:200px; dialogWidth:300px; center:Yes; help:No; resizable:No; status:no;");   
10document.opener.location.reload = true;   
11return;   
12}   
13else{   
14return;   
15}   
16}   
17}   
18</script>
Published At
Categories with Web编程
comments powered by Disqus