• html----四种“返回按钮”的使用


    <html:form method="post" action="mypath/action1.do?method=showIndex" >

       

    <input type="hidden" name="fatherID" id="fatherID" value="${Current_Id}" />

       

    1. <!--提交式返回,很少这么用,自己用过的情形是就是为了返回 -->     

    <input id="return" name="Submit" type="submit" class="btn" value="返回1"/>

     

    2. <!-- 此返回,是直接调用之前一次的请求  -->

    <input type="button" class="btn"  value="返回2" onclick="javascript:history.go(-1);"/>

     

    3. <!-- 这里,“action1Form”要为此Form表单里action对应的Form名,从struts的配置文件里可知。   

    <input id="cancle" name="cancle" type="submit" class="btn" value="返回3" onclick="action1Form.action='${ctx }/mypath/action1.do?method=showIndex&fatherID=${Current_Id}'" />

     

    4. <!-- 这里是使用JS调用Action来实现返回  -->

    <input type="button"  class="blue_btn" value="返回4" onclick="javascript:window.location.href='${ctx}/project/action2.do'"/>

     

     

    </html:form>

  • 相关阅读:
    应届毕业生简历撰写技巧
    【LeetCode】- Longest Substring Without Repeating Characters
    线性规划
    什么是凸规划
    最优化算法 (一)
    香农定理和频谱效率
    虚函数的用法
    QT学习一
    努力!
    Qslider
  • 原文地址:https://www.cnblogs.com/yanxiaoge/p/10876061.html
Copyright © 2020-2023  润新知