更换域名但访问地址不变的转向代码
[
2007/09/10 20:49 | by sunle ]
2007/09/10 20:49 | by sunle ]
<script language="javascript">
var newdomain="www.sunle.net"; //新域名,例如说跳到 www.sunle.net
var stoptime=0; //页面停留时间,以秒为单位
var My_Url=document.location.href;
godomain();
function godomain()
{
var str=My_Url;
stag=str.indexOf('//')+1;
str=str.substring(stag+1,str.length)
stag=str.indexOf('/');
rstr=str.substring(0,stag);
olddomain=rstr;
My_Url=My_Url.replace(olddomain,newdomain);
setTimeout("gourl()",stoptime*1000);
}
function gourl()
{window.location=My_Url;}
</script>
var newdomain="www.sunle.net"; //新域名,例如说跳到 www.sunle.net
var stoptime=0; //页面停留时间,以秒为单位
var My_Url=document.location.href;
godomain();
function godomain()
{
var str=My_Url;
stag=str.indexOf('//')+1;
str=str.substring(stag+1,str.length)
stag=str.indexOf('/');
rstr=str.substring(0,stag);
olddomain=rstr;
My_Url=My_Url.replace(olddomain,newdomain);
setTimeout("gourl()",stoptime*1000);
}
function gourl()
{window.location=My_Url;}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.content_12pt{
font-size:14px;
color:#000000;
line-height: 20px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
text-align: justify;
margin-top: 0;
margin-bottom:0;
vertical-align:top;
}
.ContentHighlight{
display:block;
float: left;
font-size:39px;
color: #990000;
width: 40px;
height: 36px;
line-height:36px;
+line-height:40px !important;
_line-height:40px;
padding:0;
margin:0;
}
-->
</style>
</head>
<body>
<p class='ContentHighlight'>第</p><span class='content_12pt'> 正文 </span>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.content_12pt{
font-size:14px;
color:#000000;
line-height: 20px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
text-align: justify;
margin-top: 0;
margin-bottom:0;
vertical-align:top;
}
.ContentHighlight{
display:block;
float: left;
font-size:39px;
color: #990000;
width: 40px;
height: 36px;
line-height:36px;
+line-height:40px !important;
_line-height:40px;
padding:0;
margin:0;
}
-->
</style>
</head>
<body>
<p class='ContentHighlight'>第</p><span class='content_12pt'> 正文 </span>
</body>
</html>




