详细信息
来自:关键字:判断当前页面文件名,JS跳转到指定页面.
September 18th,2009 16:39:29 Category :
Javascript
Click (2976)
<script>
var strUrl=window.location.href;
var arrUrl=strUrl.split("/");
var page=arrUrl[arrUrl.length-1];
alert(page);
if (page.substr(0,10)=="index.html") {
window.location.href='http://www.sohu.com';
}
if (page.substr(0,17)=="CategoryList.html"){
window.location.href='http://www.sina.com.cn';
}
</script>
下一主题:被国人误传了几千年的八句俗语
上一主题:JS让图片自动缩放
[ 资讯评论 ]
暂时没有任何评论!
[ 提交评论 ]