我看到這回去在網站中的代碼,我試圖在我的網站上使用它。我在理解如何生成toURl和refUrl時遇到困難。請指導他們的結構。由於瞭解此返回邏輯
var backtriggered = false;
setTimeout('goBack()',timer);
function goBack() {
if(backtriggered) return false;
backtriggered = true;
toURL=getWelcomeCookie('toURL');
refURL = getWelcomeCookie('refURL');
var reg = /(.*)\/sites\/(.*)\/(\d{4})\/(\d{2})\/(\d{2})\/(.*)\/?/;
if(reg.test(toURL) == false){
document.cookie="toURL"+ "=" +escape(toURL)+";path=/; domain=.mycsnippets.com; expires=Thu, 01-Jan-1900 00:00:01 GMT";
document.cookie="refURL"+ "=" +escape(toURL)+";path=/; domain=.mycsnippets.com; expires=Thu, 01-Jan-1900 00:00:01 GMT";
}
location.href=toURL;
}
你的問題到底是什麼? – 2013-02-17 07:27:36
什麼是document.cookie =「toURL」+「=」+ escape(toURL)+「; path = /; domain = .mycsnippets.com; expires = Thu,Jan-1900 00:00:01 GMT」; 呢? – 2013-02-17 07:28:58