检测这个页面是从哪个页面转过来的
来源: 录入时间:07-06-09 21:43:04
<!--把如下代码加入<body>区域中:--> <SCRIPT> <!-- function check(){ //remove this line to use the script for real var from = document.referrer var here = "http://www.webjx.com/js/311.htm" //Change this to your site alert("From:"+from);//remove this line to use the script for real alert("Here:"+here);//remove this line to use the script for real if (from.substring(0,here.length) != here) history.back() else document.location.replace('http://www.webjx.com/js/311.htm'); //Page to go to if OK }//remove this line to use the script for real //--> </SCRIPT> <FORM> <INPUT TYPE=button VALUE="Check" onClick="check()"> </FORM>
上一篇文章: 下一篇文章: