首页 > Web开发 > 详细

实现一个jsp同时提交两个form到两个Servlet

时间:2015-02-01 10:42:59      阅读:417      评论:0      收藏:0      [点我收藏+]
<%@ page contentType="text/html;charset=GBK" language="java"%>
<html>
<head>
<script type="text/javascript">
function submit(){
document.a.submit;
document.b.submit;
}
</script>
</head>
<body>
<form name="a" action="#" method="post">
<input type="text" name="aa" >
<input type="button" name="sub" value="提交" onclick="submit();">
 
</form>
<form name="b" action="#" method="post">
<input type="text" name="bb" id="bb">
</form>
</body>
<%  String aa=request.getParameter("aa");
    String bb=request.getParameter("bb");
    out.println("aa="+aa+"         "+"bb="+bb);
%>
</html>

实现一个jsp同时提交两个form到两个Servlet

原文:http://www.cnblogs.com/outlooking/p/4265238.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!