我调试了以下代码,发现如果把form表单去掉,点击“升级”有效果出来,然后移到工程里,点“升级“”时这时有带表单提交,在ie下显示的图片却是静态的,这有什么解决办法吗?不好意思只有2分可给
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script type="text/javascript">function ShowWaitDisplay()
{document.getElementById('WaitNote').style.display='';
Img = document.getElementById('WaitImage');
Img.style.display="inline";
Img.src = "loading.gif";
window.scrollTo(0,0);
return true;
}
</script>
</head><body>
<form>
<div id="WaitNote" style="display:none" >
<table height="300" border="1" cellpadding="25" align="center">
<tr><td valign="center" class="gridalternate">
<p><center><img id="WaitImage" src="loading.gif">
<span style="font-size:12pt;font-weight:bold;">
upgrading......
</span>
</center>
</p>
</td></tr></table>
</div>
<input type="submit" class="cbi-input-apply" onclick="ShowWaitDisplay()" value="升级"/>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script type="text/javascript">function ShowWaitDisplay()
{document.getElementById('WaitNote').style.display='';
Img = document.getElementById('WaitImage');
Img.style.display="inline";
Img.src = "loading.gif";
window.scrollTo(0,0);
return true;
}
</script>
</head><body>
<form>
<div id="WaitNote" style="display:none" >
<table height="300" border="1" cellpadding="25" align="center">
<tr><td valign="center" class="gridalternate">
<p><center><img id="WaitImage" src="loading.gif">
<span style="font-size:12pt;font-weight:bold;">
upgrading......
</span>
</center>
</p>
</td></tr></table>
</div>
<input type="submit" class="cbi-input-apply" onclick="ShowWaitDisplay()" value="升级"/>
</form>
</body>
</html>
看你的代码也不像要提交表单数据的样子,干嘛用form?改为button就出来了
<input type="button" class="cbi-input-apply" onclick="ShowWaitDisplay()" value="升级"/>
如果不是你符合你的需求 请把需求说清楚。
你现在不就是表单提交前,显示一个load效果吗?
至于你说的,是不是在其它的代码里啊?但是代码又没帖出来
我有用在表单中了,表单中要用input.
aspwebchh
是的,只是部份代码。我是要在表单提交时触发显示一个动态图片,表示系统正在处理
整体实现效果发在这里
放弃动态图片,改用css后解决,代码如下:
<html>
<style>
.progress_bar{
border:0px solid #000000;
width:120px;
background:#F5F5F5;
margin-right:auto;
margin-left:auto;
}
.progress_bar div{
float:left;
font-size:1px;
border:1px solid #ECF2FF;
background:#6699CC;
width:5px;
height:12px;
}
<body>
<form><div id="v_message" style="display:none;" ><center>
<marquee class="progress_bar" direction="right" scrollamount="5" scrolldelay="10">
<div></div><div></div><div></div><div></div><div></div><div></div></marquee>
</center>
</div>
<input type="submit" class="cbi-input-apply" onclick="show_pb_bar()" value="
</form>
</body>
</html>