a.jsp页面有两个控件分别为 branchCD,productCD.想实现点击更新按钮(或超连接),在branchCD,productCD都不为空时跳转到b.jsp并传递branchCD,productCD两个参数,否则提示branchCD,productCD都不能为空
解决方案 »
- ireport PDF 打印 参数传递为空
- 求助;为什么使用Statement容易出错,存在漏洞
- 我的tomcat启动时有点小疑惑
- <c:import>文件导入标签的应用,为什么出错?(在线等)
- 如何才能获取正确的文件夹物理路径????
- eclipse启动错误,我找不到那里错误,有那位遇到类似情况,进来看看,帮忙解决一下,不胜感激?
- 如何获取web.xml中<context-param>的值
- 二进制如何转化为正确的显示
- 上传目录???
- Applet与Servlet通信的奇怪问题
- 调用javabean时提示Unable to load class for JSP
- JSP+ACTION 如何打印word或者excel
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script language="javascript" type="text/javascript">
function subControl(){
if(document.getElementsByName("branchCD")[0].value == ""){
alert("branchCD is empty!");
return false;
}else if(document.getElementsByName("productCD")[0].value == ""){
alert("productCD is empty!");
return false;
}
document.getElementsByName("aa")[0].action="b.html&branchCD="+form.branchCD.value+"&productCD="+form.productCD.value;
}
</script>
</HEAD> <BODY>
<input type="text" name="branchCD" /><br/>
<input type="text" name="productCD"/><br/>
<a href="b.html" name="aa" method="post" target="_blank" onclick="return subControl()">submit</a>
</BODY>
</HTML>
function gog(){
var name = name.value;
var psw = psw.value;
if(name!=null && name !=''){
if(psw!=null && psw !=''){
window.location="b.jsp";
}else alert('密码不能为空!');
}else alert("姓名不能为空!"); }
</script><input type="text" id = "name" >
<input type="text" id="psw">