落落空間

          緣來是java
          posts - 12, comments - 12, trackbacks - 0, articles - 1
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          一個form多個有選擇的提交

          Posted on 2007-06-08 16:23 落落 閱讀(1190) 評論(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)
          主站蜘蛛池模板: 松原市| 七台河市| 通城县| 青阳县| 台中市| 桦南县| 资兴市| 阳东县| 墨竹工卡县| 哈尔滨市| 饶河县| 五峰| 泸水县| 武陟县| 法库县| 长寿区| 江山市| 盐源县| 乌拉特中旗| 宜良县| 调兵山市| 紫云| 绍兴县| 贵州省| 泾源县| 木兰县| 郸城县| 天峻县| 塘沽区| 五河县| 威海市| 北碚区| 潮州市| 资阳市| 开阳县| 丰都县| 镇平县| 永康市| 马边| 凯里市| 福州市|