提交时页面跳转问题
这个是静态页面代码!
<script language="JavaScript" type="text/JavaScript">
confirm("有相同的用户还需要增加么?");
document.myform.action = "InsertPresMedicine";
document.myform.submit();
</script>
<script language="JavaScript" type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
window.opener=null;
window.top.close();
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;>
<link rel="stylesheet" type="text/css" href="masterment.css">
<title>load</title>
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" onload="document.myform.yakuzicode.focus();" >
<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFCCFF"><strong>load</strong></td>
</tr>
</table>
<p> </p>
<form name="myform" method="post" action="UpYakuzi">
<table width="70%" height="59" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr height="30">
<td width="35%" bgcolor="#D9D9FF"><div align="center"> code </div></td>
<td width="65%" bgcolor="#D9D9FF"><div align="center">
<input name="yakuzicode" type="text" size="20" maxlength="15">
</div></td>
</tr>
<tr height="30">
<td bgcolor="#D9D9FF"><div align="center"> name </div></td>
<td bgcolor="#D9D9FF"><div align="center">
<input name="yakuziname" type="text" size="20" >
</div></td>
</tr>
<tr height="30">
<td bgcolor="#D9D9FF"><div align="center"> yjcode</div></td>
<td bgcolor="#D9D9FF"><div align="center">
<input name="yjcode" type="yjcode" size="20" maxlength="20">
</div></td>
</tr>
</table>
<p> </p>
<table width="71%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td width="50%" align = "right">
<input type="button" class="buttonload1" onClick="MM_openBrWindow('masterment.jsp','','status=yes,width=400,height=450,left=312,top=130')" value ="cancle">
</td>
<td width="50%"><div align="right">
<input type="submit" name="submit" value="load" class="buttonload1"
onClick = "return formsubmit()" size="5">
</div></td>
</tr>
</table>
<script language="JavaScript">
function formsubmit(){
return confirm("要注册么?");
}
</script>
</form>
<p> </p>
</body>
我现在的问题是:
confirm("有相同的用户还需要增加么?");
document.myform.action = "InsertPresMedicine";
document.myform.submit();
提交不了 !请问如何解决呀?
程序是这样的。首先点击 load 报出对话框 “要注册么?”点 确定,后台查找到有这个用户就问“有相同的用户还需要增加么?”,在点“确定”就增加,点“返回”不增加?现在我的程序走到“有相同的用户还需要增加么?”的时候,点确定出现了错误,说 document.myform.action =null;请问如何解决??