<script type="text/javascript"><!--
function getCookieGS(offset){
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));}
function GetCookie(name){
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen){
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieGS (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;}
return null;}
function SetCookie(name, value){
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");}
var expdate = new Date();
var count;
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(count = GetCookie("gscount")))
count = 0;
count++;
SetCookie("gscount", count, expdate, "/", null, false);
var message;
if(count == 1) message="歡迎光臨笨網論壇!";
if(count == 2) message="請share本站!";
if(count == 3) message="笨笨網站歡迎你!";
if(count == 4) message="請給本站一個讚!";
if(count >= 5) message="請多多指教!";
alert("你是第 "+count+" 次到訪本站,"+message);
// --></script>
以下句子可修改,每次到訪會出現不同歡迎字句
if(count == 1) message="歡迎光臨笨網論壇!";
if(count == 2) message="請share本站!";
if(count == 3) message="笨笨網站歡迎你!";
if(count == 4) message="請給本站一個讚!";
if(count >= 5) message="請多多指教!";
alert("你是第 "+count+" 次到訪本站,"+message);
如不能顯示語法效果可貼去本站語法測試板試看
歡迎光臨 笨笨網站超級論壇 (http://www.bunbunhk.com/BBS/Discuz/) | Powered by Discuz! 6.0.0 |