Groups
Groups
Sign in
Groups
Groups
hsinchu.js
Conversations
About
Send feedback
Help
在 Safari 上的 window.onbeforeunload
140 views
Skip to first unread message
gugod
unread,
Dec 21, 2007, 2:25:05 AM
12/21/07
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hsinchu.js
onbeforeunload 在 Safari 上的行為不太一樣。IE 與 Firefox 需要設置 event.returnValue ,但
在 Safari 上的需要傳回它:
window.onbeforeunload = function(event) {
if (!event) event = window.event; // for IE
var message = "You have something unsaved.";
if (is_safari) {
return message;
}
event.returnValue = message;
}
banan...@gmail.com
unread,
Dec 31, 2007, 9:14:11 AM
12/31/07
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hsinchu.js
除 Opera 外, 我測試過 return 已經可以
Reply all
Reply to author
Forward
0 new messages