JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:Better idea for closing window? [Re:hellotheworld]
shasun





發文: 118
積分: 0
於 2006-12-01 18:15 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
i'm not sure is this match your question?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
 
<script language="JavaScript">
var showMessage = 1;
 
function window.onload() {
  window.attachEvent("onbeforeunload", OnClose);
}
 
function OnClose() {
  if(showMessage == 1){
    event.returnValue = "Are you sure you want to close this window?";
  }else{
    return;
  }
}
 
function setMessage(value) {
  showMessage = value;
}
</script>
 
<body>
  <input type="button" name="btn1" value="save" onclick="setMessage(0);">
</body>
 
</html>


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
1531 Better idea for closing window? hellotheworld 652 2006-12-01 15:58
1496 Re:Better idea for closing window? shasun 524 2006-12-01 18:15
1517 Re:Better idea for closing window? hellotheworld 18 2006-12-04 12:44
» JWorld@TW »  Servlet/JSP 討論區

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8