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;
}
}......
<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;
}
}......
function GotoDisplay(){里有window.open,当然要重新打开页面了打开一个新页面,但当前页面不至于刷新啊.