zoukankan      html  css  js  c++  java
  • 前端获取后台数据,前端根据获取的数据判断Repeater列是否显示或隐藏

    aspx.cs

    public bool ShowInside_model = True;

    aspx

    <script type="text/javascript">

    $(function() {
                //判断权限
                var ShowInside_model = "<%=ShowInside_model %>";
                if(ShowInside_model.toString() == "True")
                {
                    $('[id=tdinside_model]').hide();
                    $('[id=tdinside_model2]').hide();
                }

        else

        {

          $('[id=tdinside_model]').show();
                    $('[id=tdinside_model2]').show();

        }

            });

    </script>

    <body>

      <table class="GridBarChi" style="1780px; " id="tb_chi" >
                <tr>
                    <th style="150px;" id="tdinside_model">
                       内部型号
                    </th>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server"
                    onitemdatabound="Repeater1_ItemDataBound">
                    <ItemTemplate>
                        <tr >
                            <td id="tdinside_model2">
                                <asp:Label ID="inside_model" runat="server" Text='<%#Eval("inside_model")%>'></asp:Label>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>

    </body>

  • 相关阅读:
    没有spring如何使用注解下篇
    在没有spring框架如何使用注解上篇
    oracle11g里sqldeveloper不能打开的问题
    java代码换行
    枚举接口Enumeration
    java开发环境的搭建(上班笔记01)
    2013.12.12-2013.12.22面试
    2013.12.12-2013.12.20面试
    supervisor superlance
    Laravel 返回日期问题2021-07-23T05:56:03.000000Z
  • 原文地址:https://www.cnblogs.com/lengv10/p/3652273.html
Copyright © 2011-2022 走看看