ext_addChk.ext.jsp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="/ssTag" prefix="ss"%>
  3. <html>
  4. <head>
  5. <script>
  6. // 封装方法,修改表单的action属性并提交
  7. function changeFormActionAndSubmit(formId, newActionUrl) {
  8. // 获取表单元素
  9. var form = document.getElementById(formId);
  10. if (form) {
  11. // 修改表单的 action 属性
  12. form.action = newActionUrl;
  13. // 提交表单
  14. form.submit();
  15. } else {
  16. console.error("Form with ID '" + formId + "' not found.");
  17. }
  18. }
  19. </script>
  20. </head>
  21. <body>
  22. <form method="post" id="myForm">
  23. <div class='content-div' ssFith='{max:300,min:100,lvl:1,fixHeight:150}'>
  24. ${objMsg}
  25. </div>
  26. <input type='text' name='shsm'/> <%-- 最后会写到 审核 表里的 说明 字段。Lin --%>
  27. <div class="bottom-div" >
  28. <div class="bottom-down-div">
  29. <input type="submit" value="同意" class="bottom-button"
  30. <%-- onclick='<serv@ss subm="true" name="ss.agrTask" parm="{shid:&quot;${shid}&quot;}"/>'/> --%>
  31. onclick='changeFormActionAndSubmit("myForm",
  32. "http://localhost:8080<ss:serv name='ss.agrTask' dest='ext_info' parm='{shid:&quot;${shid}&quot;,userId:&quot;${userId}&quot;}'/>");'/>
  33. <input type="submit" value="退回" class="bottom-button"
  34. <%-- onclick='<serv@ss subm="true" name="ss.rejTask" parm="{shid:&quot;${shid}&quot;}"/>'/> --%>
  35. onclick='changeFormActionAndSubmit("myForm",
  36. "http://localhost:8080<ss:serv name='ss.rejTask' dest='ext_info' parm='{shid:&quot;${shid}&quot;,userId:&quot;${userId}&quot;}'/>",this);'/>
  37. <input type="button" onclick="wd.display.closeDialog();" class="bottom-button" value="关闭" />
  38. </div>
  39. </div>
  40. </form>
  41. </body>
  42. </html>