图片加载前,如何显示别的文字

ghostmirror 2003-09-25 10:18:32
<div style="position:absolute; left:62px; top:94px; width:243px; height:179px; z-index:1; visibility:visible;" id="Layer1">
<img border="0" src="。。。" width="" height="" name="tmpimg">
</div>

就是因为这个layer加载图片需要一定时间,所以在加栽图片前要显示
"Loading..."之类的文字。。然后等图片出来后,"Loading。。。“消失

这种应该怎么实现?? thanks
...全文
114 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
scycgjr 2003-09-26
  • 打赏
  • 举报
回复

用vml写的进度条
-------------------------------------------
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]-->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script lanuage="javascript">
var pos1=1,posall=200 //定义全局变量,pos1为当前进度,posall为总进度
var stopflag=0;
function play1()
{ //播放函数
if(pos1<posall)pos1+=1;
else
{
pos1=1;
fill1.color="rgb("+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+","+Math.round(Math.random()*255)+")"
// location.href="Coordinate.asp?flag=1&totalstr="+param1+"&partstr="+param2;
document.all("showinfo").style.display="none";
document.all("showpic").style.display="";
}
a.style.width=Math.round(300/(posall/pos1));
jindu.innerText=Math.round(100/(posall/pos1))+"%"
fill1.angle=Math.round(300/(posall/pos1))
}
function loaddata()
{
setInterval("play1()",50);
}
</script>

</head>

<body onload="loaddata();">
<div id="showinfo" name="showinfo" style="display:">
<v:RoundRect id='a' style='position:absolute;left:300;top:250;height:29;'>
<v:Textbox inset='5px,5px,5px'><b><font size='2' color='red' id='jindu'></font></b></v:textbox>
<v:fill type='gradient' id='fill1' color='blue'/>
</v:RoundRect>
</div>

<p>
<div id="showpic" name="showpic" style="display:none">
<img border="0" src="file:///C:/Documents%20and%20Settings/Administrator/桌面/饼图形状1.bmp" width="381" height="142">


</body>

</html>
nba23 2003-09-25
  • 打赏
  • 举报
回复
http://expert.csdn.net/expert/faq/faq_index.asp?id=44636

87,988

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧