落落空间

缘来是java
posts - 12, comments - 12, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

一个form多个有选择的提交

Posted on 2007-06-08 16:23 落落 阅读(1179) 评论(1)  编辑  收藏 所属分类: javascript

 

 1   <table cellpadding="0" cellspacing="0">
 2                <thead>
 3                    <tr>
 4                        <td>用户名</td>
 5                        <td>密码</td>
 6                        <td>性别</td>
 7                        <td>.</td>
 8                    </tr>
 9                </thead>
10                <tbody>
11                    <tr>
12                        <td><input type="text" name="uname" ></td>
13                        <td><input type="password" name="password" ></td>
14                        <td><input type="text" name="sex" ></td>
15                        <td></td>
16                    </tr>
                           <tr>
                                <td>
                                     <input type="button" name="query" value="增加" onclick="queryAddSubmit()">
                                     <input type="button" name="modif" value="修改" onclick="queryModSubmit()">
                                     <input type="button" name="delet" value="删除" onclick="queryDelSubmit()">
                                 </td>
                           </tr>
17            </tbody>
18        </table>
19</div>
20</form>
21<script language="javascript">
22    function queryAddSubmit()
23 {
24        document.forms[0].action="${req.contextPath}/gsp/healthCuleduAdrchiveOperUI.action?oper=add";
27        document.forms[0].submit();
28     }

29    function queryModSubmit()
30  {
31        if(!selectIsState()){return;}
32                 document.forms[0].action="${req.contextPath}/gsp/healthCuleduAdrchiveOperUI.action?oper=mod";
35                 document.forms[0].submit();
36       }

37    function queryDelSubmit()
38   {
39        if (!selectIsState()){
40                 return;
41        }
else{
42            if (confirm("确定删除此教育培训信息吗?")){
43                     document.forms[0].action = "${req.contextPath}/gsp/healthCuleduAdrchiveOperUI.action?oper=del";
46                     document.forms[0].submit();
47                }

48           }

49     }

50</script>
51</html>
52

 


评论

# re: 一个form多个有选择的提交  回复  更多评论   

2008-03-08 12:59 by guest
是STRUTS2用的吗?没有<form 标签
我用类似的做法,对象传到action里是NULL(STRUTS2)

只有注册用户登录后才能发表评论。


网站导航: