<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>
div1.innerHTML=" 请稍侯"div1.innerHTML=bar+"%" if (bar<99)
{
setTimeout("count1()",100);
} else
{
alert("载入完毕")
}
}
</script>
<body>
<div id=div1></div>
解决方案 »
- 求js正则表达式
- 把各种日期格式全都转化成YYYY-MM-DD 然后对其进行大小比较
- 求助!JavaScript不执行,查了好多资料都解决不了。。
- 如何用JS限制文本框输入带有“+-”号的整数 ,并且第一个数不能为0的代码?
- 如何根据文本框动态列出下拉列表
- 如何在.hta程序中生成一个WScript对象
- 如何获得<img>的src的值?
- 求一个jquery检测浏览器版本然后跳转页面的代码
- 哪位有Javascript的所有对象、方法、属性、函数的集合包括其说明和用法
- 城市三级联动
- 超级超级简单(追求一种视觉效果),顶者有分!
- 求js进度条:如http://www.xici.net/的 ----在线等待 急
document.all.aa.innerText=amount;
/* 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