• webform的操作完之后返回主页面的行定位


    1.在repeater表格的行绑定时给行一个id(唯一id),此地方为绑定该表格的主键。

    2.给定一个隐藏域

    <input id="hidID" type="hidden" runat="server" />

    3.在进入到编辑页面时,将唯一主键相继带入。赋给隐藏域

    4.增加两个js

     function lod() {
                    $(".biaoge tr").eq(1).addClass("sh");  
            }

     function dingwei() {
                     $("#" + $("#hidID").val()).css("background", "#CCCCFF")
             }
    5.后台载入的时候调用js

                if (!string.IsNullOrEmpty(this.hidID.Value))
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>dingwei();</script>");              
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>lod();</script>");
                }

  • 相关阅读:
    toj 2975 Encription
    poj 1797 Heavy Transportation
    toj 2971 Rotating Numbers
    zoj 2281 Way to Freedom
    toj 2483 Nasty Hacks
    toj 2972 MOVING DHAKA
    toj 2696 Collecting Beepers
    toj 2970 Hackle Number
    toj 2485 Card Tric
    js页面定位,相关几个属性
  • 原文地址:https://www.cnblogs.com/lytwajue/p/6856570.html
Copyright © 2020-2023  润新知