type="image"的按钮点后(只执行了简单了JS)为什么界面会刷新?
<input id="CmdCustomer" style="WIDTH: 65px; HEIGHT: 20px" src="../images/msgbox42.gif" onClick="if(Verify()== true) { GotoDisplay();}" type="image">
----
JS:
 function GotoDisplay(){ 
try{ 
var DropStat =document.getElementById("DrpStat"); 
var Stat=DropStat.options[DropStat.selectedIndex].value; 
//document.all.div1.style.visibility='hidden'; 
window.open('../Vendor/VD_PoDisplay.aspx?modi=1&ispo=true&ispowx=true&iswx=true&type='+ Stat;} 
catch(ex){alert(ex.message); } }
function Verify()
{
var Condition=false;
var txtOrderDateFromClientID =document.getElementById("txtOrderDateFrom");
var txtOrderDateToClientID =document.getElementById("txtOrderDateTo");
if (txtOrderDateFromClientID.value=='')
{
if (txtOrderDateToClientID.value !='')
{
Condition=true;
sAlert('请输入采购起始日期!');
return false;
}
}......

解决方案 »

  1.   

    function GotoDisplay(){里有window.open,当然要重新打开页面了
      

  2.   

    我是楼主.
    function GotoDisplay(){里有window.open,当然要重新打开页面了打开一个新页面,但当前页面不至于刷新啊.
      

  3.   

    解决了.原因是这个图片按钮在<form  runat="server"></form>里面了,把form标签去掉,就好了.真奇怪,把图片按成HTML的button即使放在<form  runat="server"></form>里面,也没有问题.难道是BUG?