设为首页
加入收藏
帮助中心
首页 | 红盾通告 | 信息中心 | ASP技术 | 数据库 | 网页设计 | 网管专栏 | OICQ攻略 | 墨客频道 | 网站运营 |
当前位置:首页 >> 网页设计 >> Javascript >> 正文
最新信息
·Javascript处理数字的几个…
·判断当前网页是否为本站页…
·鼠标指上图片替换后出现下…
·逍遥狼无图片智能圆角
·javascript获取当前网页文…
·用javascript获得地址栏参…
·JavaScript常用判断函数
·双击鼠标滚动屏幕的代码
·web应用漏洞扫描工具Jikto…
·常备JS操作
资料搜索
热点信息
·js获取图片尺寸
·怎么让弹出窗口最大化
·web应用漏洞扫描工具Jikto…
·判断radio多个单选按纽中是…
·如何用文字做一个只刷新验…
·防止F5刷新执行onunload事…
·Javascript获取IE浏览器窗…
·关闭IE时调用onbeforeunlo…
·js表单提交验证
·javascript获取当前网页文…
推荐信息
·显示日期方式
·添加到收藏夹
·终极应用--弹出的窗口之Co…
·防止被人frame
·web应用漏洞扫描工具Jikto…
·JavaScript常用的一些验证…
·关闭IE时调用onbeforeunlo…
·js表单提交验证
·自己综合其他资料写的一套…
·window.open具体参数


Google
 
页面转换特效
〖编辑:Cloudy | 浏览:人次〗

脚本说明:
第一步:把如下代码加入<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+"'>&nbsp;</td></tr></table>"
        curtaincontent2="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor2+"'>&nbsp;</td></tr></table>"
        curtaincontent3="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor3+"'>&nbsp;</td></tr></table>"
        curtaincontent4="<table cellpadding=0 cellspacing=0 width='"+screenwidth+"' height='"+screenheight+"'><tr><td bgcolor='"+curtaincolor4+"'>&nbsp;</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">


录入时间:2006-06-20 11:55:01 [打印本页] [关闭窗口] [返回顶部]
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。

Copyright © 2006-2014 0733168.Com Inc All Rights Reserved
关于我们 | 广告合作 | 联系我们 | 法律声明 | 友情链接 | 意见反馈
本站所收录信息、社区话题、及本站所做之广告均属其个人行为,与本站立场无关
湘ICP备06008436号