zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    01前端-html
    2-3程序流程
    2-2视频缓存池
    2-1图像像素格式深度理解
    3.1.1 文件系统介绍
    3.1.4 文件属性
    CentOS开放端口的方法
    宝塔linux面板命令大全
    如何卸载Win10 RS3上预装的office2016
    win10家庭版升级专业版的两种方法和密钥
  • 原文地址:https://www.cnblogs.com/yanxiaoge/p/10876061.html
Copyright © 2011-2022 走看看