• js网页进度条等待特效


    本特效共分三步:
    1.在<head></head>中加入:
    <SCRIPT type=text/javascript>
    <!--
    var ie5 = (document.all && document.getElementsByTagName);
    var step = 0;
    function setSB(v, el, inforEl, message) {
    if (ie5 || document.readyState == "complete") {
    filterEl = el.children[0];
    valueEl = el.children[1];
    if (filterEl.style.pixelWidth > 0) {
    var filterBackup = filterEl.style.filter;
    filterEl.style.filter = "";
    filterEl.style.filter = filterBackup;
    }
    filterEl.style.width = v + "%";
    valueEl.innerText = v + "%";
    inforEl.innerText = message;
    }
    }
    function setSBByStep(v, el, inforEl, message) {
    if (ie5 || document.readyState == "complete") {
    step = step + v;
    filterEl = el.children[0];
    valueEl = el.children[1];
    if (filterEl.style.pixelWidth > 0) {
    var filterBackup = filterEl.style.filter;
    filterEl.style.filter = "";
    filterEl.style.filter = filterBackup;
    }
    filterEl.style.width = step + "%";
    valueEl.innerText = step + "%"
    inforEl.innerText = message;
    }
    }
    function fakeProgress(v, el) {
    if (v >= 101)
    location.href="http://www.roeyuta.com/Ch";
    else {
    setSB(v, el, infor, "欢迎访问 荣盛达电源 荣御达电源,页面载入中,请稍等!");
    window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 150);
    }
    }
    //-->
    </SCRIPT>
    2.在<body>中加入:onload=fakeProgress(0,sb)
    <BODY onload=fakeProgress(0,sb)>
    3.在<body></body>中加入:
    <DIV align=center>
    <DIV id=sb
    style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BACKGROUND: #99ccff; BORDER-LEFT: medium none; WIDTH: 400px; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 14px; TEXT-ALIGN: left">
    <DIV id=sbChild1
    style="FILTER: Alpha(Opacity=0, FinishOpacity=80, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 12px">
    <DIV style="BACKGROUND: #000000; WIDTH: 100%" ;height:12px; overflow:
    hidden></DIV></DIV>
    <DIV
    style="FONT-SIZE: 10px; WIDTH: 400px; COLOR: white; FONT-FAMILY: arial; POSITION: absolute; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV>
    <P></P>
    <DIV id=infor
    style="FONT-SIZE: 11px; WIDTH: 100%; COLOR: #999999; FONT-FAMILY: arial; POSITION: relative; HEIGHT: 14px; TEXT-ALIGN: center"></DIV></DIV>

  • 相关阅读:
    ant
    hudson
    【消息队列MQ】各类MQ比较
    日本出行
    使用Eclipse Installer安装Eclipse
    Firebug控制台详解
    浮动
    CSS3
    HTML制作视频简介
    使用I/O流复制指定文件
  • 原文地址:https://www.cnblogs.com/hnyei/p/2211127.html
Copyright © 2020-2023  润新知