zoukankan      html  css  js  c++  java
  • 刷新各ifream当前页,下拉项改变触发事件js,给选中项加背景色js

    <script type="text/javascript" language="javascript">
            //刷新框架各页面
            function refresh() {
                window.frames["topPage"].window.location.href = window.frames["topPage"].window.location.href;
                window.frames["leftPage"].window.location.href = window.frames["leftPage"].window.location.href;
                window.frames["mainTopPage"].window.location.href = window.frames["mainTopPage"].window.location.href;
                window.frames["mainBottomPage"].window.location.href = window.frames["mainBottomPage"].window.location.href;
                window.frames["rightPage"].window.location.href = window.frames["rightPage"].window.location.href;
                return false;
            }
        </script>

    让框架页面跳转:

    <script type="text/javascript" language="javascript">
    //页面跳转 function redirect() { window.parent.window['mainTopPage'].location = '../ByWhole/dqzh.aspx'; window.parent.window['mainBottomPage'].location = '../ByWhole/dqzhfx.aspx'; return false; }
    </script>

    给选中项加背景色js:

    //给选中地区加背景
        $('.main_cont_city li').each(function() {
            $(this).click(function() {
                $('.main_cont_city li').removeClass('selected');
                $(this).addClass('selected');
            });
        });
    
    <div class="main_cont_city">
                <asp:Repeater ID="rptDq" runat="server">
                    <HeaderTemplate>
                        <span class="fl">地区:</span>
                        <li class="selected"><a href='' onclick=" return redirect();">全国</a></li>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <li><a href="javascript:" onclick='dqRedirect(<%#Eval("dq_id") %>)'>
                            <%#Eval("dq_name") %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </div>

    下拉项改变触发事件js:

    var mon = "";
    
        $("#ddlMonth").change(function() {
            mon = $(this).val();
            window.frames["UpSession"].window.location.href = "../UpSession.aspx?mon=" + mon;
            refresh();
        });
    
    <asp:DropDownList ID="ddlMonth" runat="server" Width="70px">
                <asp:ListItem Value="1" Text="1月份">1月份</asp:ListItem>
                <asp:ListItem Value="2" Text="2年">2月份</asp:ListItem>
                <asp:ListItem Value="3" Text="3年">3月份</asp:ListItem>
                <asp:ListItem Value="4" Text="4年">4月份</asp:ListItem>
                <asp:ListItem Value="5" Text="5年">5月份</asp:ListItem>
                <asp:ListItem Value="6" Text="6年">6月份</asp:ListItem>
                <asp:ListItem Value="7" Text="7年">7月份</asp:ListItem>
                <asp:ListItem Value="8" Text="8年">8月份</asp:ListItem>
                <asp:ListItem Value="9" Text="9年">9月份</asp:ListItem>
     </asp:DropDownList>    
  • 相关阅读:
    Spring初次整体了解及一篇SpringBoot的稿子。。。
    JAVA日志框架log4j和slf4j
    初学SpringBoot之三
    初学SpringBoot之二
    初学SpringBoot之一
    (转)SWITCH_ROOT
    (转)initrd和initramfs的区别
    (转)三星HDMI驱动框架解析
    (转)linux内存分析
    (转)linux中挂载IMG文件
  • 原文地址:https://www.cnblogs.com/tianrui/p/3495412.html
Copyright © 2011-2022 走看看