***浏览相关***页面转换特效
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件脚本说明:
第一步:把如下代码加入<body>区域中
<script language="javascript">
<!--
// 过渡的速度
var pause=50
var widthstep=10
// 效果的色彩
var curtaincolor1="ffff00"
// 右
var curtaincolor2="ee8800"
// 下
var curtaincolor3="ee8800"
// 左
var curtaincolor4="ffff00"
var screenheight
var screenwidth
var heightstep
var maxmove=0
var timer
var url
var curtaincontent1=""
var curtaincontent2=""
var curtaincontent3=""
var curtaincontent4=""
function init() {
if (document.all) {
screenwidth=document.body.clientwidth
screenheight=document.body.clientheight
curtaincontent1="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor1+"'> </td></tr></table>"
curtaincontent2="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor2+"'> </td></tr></table>"
curtaincontent3="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor3+"'> </td></tr></table>"
curtaincontent4="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor4+"'> </td></tr></table>"
curtain1.innerhtml=curtaincontent1
curtain2.innerhtml=curtaincontent2
curtain3.innerhtml=curtaincontent3
curtain4.innerhtml=curtaincontent4
heightstep=math.round(widthstep/screenwidth*screenheight)
}
if (document.layers) {
screenwidth=window.innerwidth
screenheight=window.innerheight
curtaincontent1="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor1+"'> </td></tr></table>"
curtaincontent2="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor2+"'> </td></tr></table>"
curtaincontent3="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor3+"'> </td></tr></table>"
curtaincontent4="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor4+"'> </td></tr></table>"
document.curtain1.document.write(curtaincontent1)
document.curtain1.document.close()
document.curtain2.document.write(curtaincontent2)
document.curtain2.document.close()
document.curtain3.document.write(curtaincontent3)
document.curtain3.document.close()
document.curtain4.document.write(curtaincontent4)
document.curtain4.document.close()
heightstep=math.round(widthstep/screenwidth*screenheight)
}
}
function openpage(thisurl) {
url=thisurl
if (document.all) {
document.all.curtain1.style.postop=-screenheight
document.all.curtain1.style.posleft=0
document.all.curtain2.style.postop=0
document.all.curtain2.style.posleft=screenwidth
document.all.curtain3.style.postop=screenheight
document.all.curtain3.style.posleft=0
document.all.curtain4.style.postop=0
document.all.curtain4.style.posleft=-screenwidth
document.all.curtain1.style.visibility="visible"
document.all.curtain2.style.visibility="visible"
document.all.curtain3.style.visibility="visible"
document.all.curtain4.style.visibility="visible"
movecurtains()
}
if (document.layers) {
document.curtain1.top=-screenheight
document.curtain1.left=0
document.curtain2.top=0
document.curtain2.left=screenwidth
document.curtain3.top=screenheight
document.curtain3.left=0
document.curtain4.top=0
document.curtain4.left=-screenwidth
document.curtain1.visibility="visible"
document.curtain2.visibility="visible"
document.curtain3.visibility="visible"
document.curtain4.visibility="visible"
movecurtains()
}
}
function movecurtains() {
if (maxmove<=screenwidth/2) {
if (document.all) {
document.all.curtain1.style.postop+=heightstep
document.all.curtain2.style.posleft-=widthstep
document.all.curtain3.style.postop-=heightstep
document.all.curtain4.style.posleft+=widthstep
}
if (document.layers) {
document.curtain1.top+=heightstep
document.curtain2.left-=widthstep
document.curtain3.top-=heightstep
document.curtain4.left+=widthstep
}
maxmove+=widthstep
var timer=settimeout("movecurtains()",pause)
}
else {
cleartimeout()
document.location.href=url
}
}
// - end of javascript - -->
</script>
<style>
.curtain {
position:absolute;
visibility:hidden;
}
</style>
<div id="deletethisblock" class="redirstyle" style="position:absolute;left:10px;top:10px;color:000000;font-family:"宋体";font-size:9pt">
<a href="javascript:openpage('http://61.156.37.24/condx/')">看看效果吧!!</a>
</div>
<div id="curtain1" class="curtain"></div>
<div id="curtain2" class="curtain"></div>
<div id="curtain3" class="curtain"></div>
<div id="curtain4" class="curtain"></div>
第二步:把<body>中的内容改为:
<body bgcolor="#fef4d9" onload="init()" style="width:100%;overflow-x:hidden;overflow-y:hidden">
------------------ ---------- ----------
拥 有三人行论坛管理系列软件,一个人就可以管理一个论坛的更新维护。还能使您的论 坛有千人在线的真实火暴效果,让您不在为论坛因 没有人气而留 不住会员而烦恼,使您的论坛早日成为一流的论坛。详情请登 陆网站:h ttp: //www.cnsrx.cn 三人行论坛管 理软件,站长必备的专业好工具。(您使用的是免费版本,购买收费版本后,将不带广告。业务QQ:247216 44985227)
页:
[1]