请问有的页面在再如的时候,小时一个图片.再如进度的图片。载如后就不显示啦.怎么实现.谢谢 是的,或者显示一个gif图片! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 先把seloader.js文件放到你的站点根目录里,然后复制以下代码到[head]和[/head]之间<style type="text/css">/* Container of Loader */#seLoader{ width : 200px; /* set width of loader */ z-index : 1; margin : auto;}/* Box around loadbar */#seLoadBox{ height : 12px; /* set height */ z-index : 3; border : 1px solid; padding : 1px; background-color : #efefef; font-size : 0px; text-align : left;}/* loadbar */#seLoadBar{ width : 0%; height : 100%; z-index : 4; background : #f90;}/* text (%) */#seLoadTxt{ z-index : 5; margin-top : -14px; font : 10px Verdana,Geneva,sans-serif;}</style><script src="seLoader.js" type="text/javascript"></script><script type="text/javascript">load = new seLoader('img/') // 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( 'Image1.gif','Image2.gif','Image3.gif','Image4.gif','Image5.gif','Image6.gif','Image7.gif', 'Image8.gif','Image9.gif','Image10.gif','Image11.gif','Image12.gif','Image13.gif','Image14.gif','Image15.gif', 'Image16.gif','Image17.gif','Image18.gif','Image19.gif')function viewPage(){ location.replace('http://www.hot4.org/java')}function initLoader(){ load.load()}onload=initLoader</script>注明:前半部分是设定进度条的颜色和规格load = new seLoader('img/') // make loader object and set the directory (dir optional)这里是设定读取图片的位置( 'Image1.gif','Image2.gif','Image3.gif','Image4.gif','Image5.gif','Image6.gif','Image7.gif', 'Image8.gif','Image9.gif','Image10.gif','Image11.gif','Image12.gif','Image13.gif','Image14.gif','Image15.gif', 'Image16.gif','Image17.gif','Image18.gif','Image19.gif')这里是读取图片的名字然后以下复制代码到body后<div align="center"><script>load.drawLoader('now loading...')</script></div> 一下是js代码 将它复制到dw里存成JS文件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) }} ASPNET在指定的时间发送电子邮件该如何实现? 关于字符串的问iti 我的 第一个 项目 就不会啊 !! asp.net 页面缓存默认是多少? 在那里可以设置 通过Web Services上传和下载文件 好久没来,好多问题,^^。。。 利用asp.net框架开发时,加以用以前如vbscript或javascript语句吗? 在asp.net如何操作文件夹? 针对datareader的分页方法? 关于XML的一个问题 如何动态从后台代码给DataGrid增加具有排序功能的TemplateColumn? 在地上滚来滚去求高人相助!!!!vs.net c#
<style type="text/css">
/* Container of Loader */
#seLoader
{
width : 200px; /* set width of loader */
z-index : 1;
margin : auto;
}/* Box around loadbar */
#seLoadBox
{
height : 12px; /* set height */
z-index : 3;
border : 1px solid;
padding : 1px;
background-color : #efefef;
font-size : 0px;
text-align : left;
}/* loadbar */
#seLoadBar
{
width : 0%;
height : 100%;
z-index : 4;
background : #f90;
}/* text (%) */
#seLoadTxt
{
z-index : 5;
margin-top : -14px;
font : 10px Verdana,Geneva,sans-serif;
}
</style>
<script src="seLoader.js" type="text/javascript"></script>
<script type="text/javascript">
load = new seLoader('img/') // 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
(
'Image1.gif','Image2.gif','Image3.gif','Image4.gif','Image5.gif','Image6.gif','Image7.gif',
'Image8.gif','Image9.gif','Image10.gif','Image11.gif','Image12.gif','Image13.gif','Image14.gif','Image15.gif',
'Image16.gif','Image17.gif','Image18.gif','Image19.gif'
)function viewPage()
{
location.replace('http://www.hot4.org/java')
}function initLoader()
{
load.load()
}
onload=initLoader
</script>
注明:前半部分是设定进度条的颜色和规格
load = new seLoader('img/') // make loader object and set the directory (dir optional)这里是设定读取图片的位置
(
'Image1.gif','Image2.gif','Image3.gif','Image4.gif','Image5.gif','Image6.gif','Image7.gif',
'Image8.gif','Image9.gif','Image10.gif','Image11.gif','Image12.gif','Image13.gif','Image14.gif','Image15.gif',
'Image16.gif','Image17.gif','Image18.gif','Image19.gif'
)这里是读取图片的名字然后以下复制代码到body后
<div align="center">
<script>load.drawLoader('now loading...')</script>
</div>
一下是js代码 将它复制到dw里存成JS文件
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)
}
}