zoukankan      html  css  js  c++  java
  • js 在一个页面两个submit 提交同一个form 到不同的action

      <script type="text/javascript">

      function changeURL(type,resultID)

    {

    var action = "";

    if(type == "update")

    {

    action = "actions/modifyRecordAction!updateInput?document.id=" + resultID;

    window.location.href=action;

    }

    if(type == "submit")

    {

    if (confirm("确定要提交到TMS吗!")) {

    action = "actions/declareAction!submitInput?document.id=" + resultID;

    window.location.href=action;

    }

    }

    }

    </script>

    <div align="center" style="margin:10 10 10 10">

    <input type="button" value=" 提&nbsp;交 " onClick="changeURL('submit',${document.id})"; src="images/system/5.gif" width="48" height="19">&nbsp;&nbsp;&nbsp;

    <input type="button" value=" 修&nbsp;改 " onClick="changeURL('update',${document.id})"; src="images/system/5.gif" width="48" height="19">

    </div>

    --------------------------------------------------------------------------------

     <script type="text/javascript">

      function changeURL(resultID)

    {    

    // alert(document.forms["targetForm"].action);

    document.forms["targetForm"].action="actions/modifyRecordAction!saveSubmitNext?document.id=" + resultID;

    return true;

    }

    </script>

    <form id="targetForm">

    <input  type="submit" src="images/system/5.gif" value="保存并提交到下一步" id="saveSubmitNext" onClick="return changeURL(${document.id})">

  • 相关阅读:
    line
    同步fifo的verilogHDL设计实例
    在DE1-SOC上运行Linux
    DE1-SOC连接设定
    Tcl语言笔记之二
    Tcl语言笔记之一
    关于复位赋初值的问题
    Altera FPGA中的pin进一步说明
    Altera FPGA中的pin简介
    笔记之Cyclone IV第一卷第四章Cyclone IV器件中的嵌入式乘法器
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218428.html
Copyright © 2011-2022 走看看