• Javascript 返回上一页:选中GridVIew的 Chekcbox


    1.  选中GridVIew的值

    $("#reverse").click(function () {

                    //$("#checkbox[Num]").attr("checked",!($("#checkbox[Num]").attr("checked")));

                    var checkboxs = $("#checkbox[Num]");

                    for (var i = 0; i < checkboxs.length; i++) {

                        var checkbox = checkboxs[i];

                        $(checkbox).attr("checked", !$(checkbox).attr("checked"));

                    }

                });

    2.  Javascript 返回上一页:

    1. history.go(-1), 返回两个页面: history.go(-2);

    2. history.back(). 

    3. window.history.forward()返回下一页

    4. window.history.go(返回第几页,也可以使用访问过的URL)  

     例:

    <a href="javascript:history.go(-1);">向上一页</a> 

    response.Write("<script language=javascript>")

    response.Write("if(!confirm('完成任务?')){history.back();}")

    response.Write("</script>")

    response.Write("<script language=javascript>history.go(-1);</script>")

    <a href="javascript:history.go(-1);">向上一页</a>

    页面跳转:onclick="window.location.href='index.aspx'"

  • 相关阅读:
    python编码小记
    eventlet学习笔记
    python库文件路径
    paste deploy初探
    python浅拷贝与深拷贝
    Javascript basic knowledge
    用大数据学习心理学
    Postgres Database management operations
    Python Socket and WSGI Sample
    Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory错误处理
  • 原文地址:https://www.cnblogs.com/jinhaoObject/p/4483892.html
Copyright © 2020-2023  润新知