<script language="javascript">//退出函数
function exitsystem()
{
if(confirm("您确定要退出办公系统吗?"))
{
parent.location.href="清控数据库的页";
window.parent.close();
}else{
return false;
}
}
</script>
<button onclick="exitsystem();">退出系统</button>或者用:
<script language=javascript>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
  window.event.returnValue="确定要退出本页吗?";
  new ActiveXObject("WScript.Shell").sendKeys("{ESC}")}
}
</script>