<script language="javascript">var bar = 0 var line = "|" var amount ="|" function count1(){ bar= bar+5 amount =amount + line div1.innerHTML=amount  //chart ,word,percent都是文本框
div1.innerHTML=" 请稍侯"div1.innerHTML=bar+"%" if (bar<99) 
{
setTimeout("count1()",100);
} else 
{
alert("载入完毕")

}
</script>
<body>
<div id=div1></div>

解决方案 »

  1.   

    可以用<span id=aa></span>
    document.all.aa.innerText=amount;
      

  2.   

    smallyear的是可以啦,但我想知道还有其它的方法没,我要做的是能在DTV上运行的
      

  3.   

    或者有其它的进度条源代码没,最好是不要用到div和文本框的,如果有那位大虾也做过在DTV浏览器上的,请指教!
      

  4.   

    <style type="text/css">
    /* Container of Loader */
    #seLoader
    {
    width : 200px; /* set width of loader */
    z-index : 1;
    margin : auto;
    }/* Box around loadbar */
    #seLoadBox
    {
    height : 14px; /* set height */
    z-index : 3;
    border : 1px solid;
    padding : 1px;
    background-color : #efefef;
    font-size : 0px;
    text-align : left;
            border-color: #678fcd
    }/* loadbar */
    #seLoadBar
    {
    width : 0%;
    height : 100%;
    z-index : 4;
    background : #678fcd;
    }/* text (%) */
    #seLoadTxt
    {
    z-index : 5;
    margin-top : -14px;
    font : 10px Verdana,Geneva,sans-serif;
            color: #ffffff
    }
    </style>
    <script language="javascript">
    function seLoader(imgRoot)
    {
    this.root = imgRoot||''
    this.runAt = 0
    this.preImg = new Array()
    this.done = 0
    this.f = 0
    this.to = 0
    eval(this.obj + '=this')
    }
    seLoader.prototype.runAtEnd = function(fct)
    {
    this.runAt = fct
    }
    seLoader.prototype.setImgs = function()
    {
    this.imgs = arguments
    }
    seLoader.prototype.load = function()
    {
    this.loadTxt = document.getElementById('seLoadTxt')
    this.bar = document.getElementById('seLoadBar').style
    for(i=0;(this.imgs[i]);i++)
    {
    this.preImg[i] = new Image()
    this.preImg[i].src = this.imgs[i].indexOf('http')==-1 ? this.root + this.imgs[i] : this.imgs[i]
    }
    this.checkLoad()

    }
    seLoader.prototype.drawLoader = function(preTxt)
    {
    this.startTxt = preTxt ? preTxt : ''
    document.writeln('<div id="seLoader"><div id="seLoadBox"><div id="seLoadBar"></div></div><div id="seLoadTxt">' + (this.startTxt!=''?this.startTxt:'0%') + '</div></div>')
    }
    seLoader.prototype.checkLoad = function()
    {
    for(i in this.preImg)
    {
    if(this.preImg[i].complete)
    {
    this.f = new Number(i)
    this.f++
    this.bar.width = Math.round(this.f/this.preImg.length*100) + '%'
    this.loadTxt.innerHTML = new String(this.startTxt+this.bar.width)
    status = this.preImg[i].src + ' loaded'
    }
    }
    if(this.f!=this.preImg.length)
    {
    clearTimeout(this.to)
    this.to = setTimeout(this.obj+'.checkLoad()',25)
    }
    else
    {
    status = this.imgs.length + ' images loaded.'
    if(this.runAt) eval(this.runAt)
    }
    }</script>
    <script type="text/javascript">
    load = new seLoader('images/') // make loader object and set the directory (dir optional)
    load.runAtEnd('setTimeout(\'viewPage()\',10)') // run a script after loading (optional)
    load.setImgs // set the images
    (
    'bg.jpg','killerj_r1_c1.jpg','killerj_r1_c2.jpg','killerj_r1_c3.jpg','killerj_r1_c4.jpg','killerj_r1_c5.jpg','killerj_r1_c6.jpg','killerj_r1_c7.jpg','killerj_r1_c8.jpg','biaoxiang-s.jpg','cahust.jpg','gongye-s.jpg','jixiang.jpg','nv1-s.jpg','nv2-s.jpg','shifang-s.jpg','shubiaoche-s.jpg','xitiqin-s.jpg','xitong1-s.jpg','xitong2-s.jpg','xitong3-s.jpg','xitong4-s.jpg','bgbg.gif','bgbgbg.gif')function viewPage()
    {
    setTimeout("woyingjie()",0)
    location.replace('main.asp')
    }function initLoader()
    {
    load.load()
    }
    onload=initLoader
    function woyingjie(){
    window.open("close.htm","bannerpopup","width=1,height=1")

    }</script>
    </head>
    <body background="images/bg.jpg" style="OVERFLOW-Y: hidden; OVERFLOW-X: hidden; OVERFLOW: scroll">
    <table width="50%" height="70%" border="0">
        <tr> 
          <td  align=center class="alpha">
              <font color=#ffffff size=2>66.7 k</font>
              <script>load.drawLoader('now loading . . .')</script>
          </td> 
        </tr>
      </table>
    </body>
    </html>
    我个人主页上用的
    演示地址
    http://woyingjie.tk
    http://killerj.tk