不用每次都詢問別人是否收藏,煩!
<SCRipT LANGUAGE="JavaScript">
<!-- Begin
var expDays = 100;
url = "http://softet.6to23.com";
title = "Come on";
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 getCookIEVal (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 = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookIE = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookIE (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookIE (name);
document.cookIE = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookIE('count')
if(count == null) {
SetCookIE('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookIE('count')
SetCookIE('count',newcount,exp)
return count
}
}
function getCookIEVal(offset) {
var endstr = document.cookIE.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookIE.length;
return unescape(document.cookIE.substring(offset, endstr));
}
function checkCount() {
var count = GetCookIE('count');
if (count == null) {
count=1;
SetCookIE('count', count, exp);
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
window.external.AddFavorite (url,title);
}
else {
var msg = "Don't forget to bookmark us!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
alert(msg);
}
}
else {
count++;
SetCookIE('count', count, exp);
}
}
checkCount();
// End -->
</script>