-1
如何在當前頁面上匹配整個JavaScript函數?我的JavaScript函數是:匹配並替換完整的JavaScript函數
window.onbeforeunload = function()
{
if(!success)
{
success = true;
alert('Think first! Click CANCEL on the next page to receive a new gift.\n\n');
window.location = 'http://www.mysite.com/';
return '\nClick CANCEL\n\nOver thousands of gifts have been given out, get yours today!\n\n';
}
}
,我想動態匹配和替換此功能:
window.onbeforeunload=function()
{
return ExitPopup();
}
請幫我解決這個問題。
你這是什麼意思匹配? – 2011-12-15 17:48:59