強制login code (Website Stat)
<script language="javas cript">
var pattern_visitor = "private\/home.aspx";
var visitor = escape(get_uname(pat tern_visitor));
function get_uname(pattern) {
for (var i=0;i < document.links.lengt h;i++) {
var current_href = document.links[i].href;
if(current_href.sear ch(pattern) != -1) {
var current_link = document.links[i];
if(current_link.inne rText) { return current_link.innerTe xt; }
else { return current_link.text; }
}
}
return "111";
}//endfunction
if (visitor == "111") {
window.alert("P lease sign in to view this xanga page.");
window.location.href = "
http://www.xan ga.com";
}
</script>
希望幫到你:)