QQ 分组

来源:互联网 发布:linux查看当前php版本 编辑:程序博客网 时间:2024/04/30 07:59
 

<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
    <title> </title>
    <link href="/sucai/styles/css.css" type="text/css" rel="stylesheet" />
    <script src="../../api/jquery/jquery-1.3.2.min.js"></script>


    <script type="text/javascript">
        var tof = true;
        //获取当前div距顶部距离,获取当前滚动条距顶部距离,如果超出,则给其添加一个属性position:fixed直到下一个被赋属性了,这个属性被去掉
        window.onscroll = scrollCheck;
        function scrollCheck() {
            var bb = $(".xmmc").length;
            var id = "";
            var idBottom = "";
            var Baseid="";
            for (var i = 1; i <= bb; i++) {
                Baseid = "Base" + i;
                id = "proName" + i;
                idBottom = "bottom" + i;
                var top = document.getElementById(Baseid).offsetTop;//获取当前div到顶部的距离
                var bottom = document.getElementById(idBottom).offsetTop;//获取当前div到顶部的距离
                var nowScroll = $(this).scrollTop();//获取当前滚动条距顶部的距离
                var obj = document.getElementById(id);
                if (nowScroll > top && nowScroll < bottom) {
                    obj.style.cssText = "position:fixed; top:47px; background-color:#FFFFFF;";
                } else {
                    obj.style.cssText = "position:static;";
                }
            }
        }
    </script>
</head>
<body>
    <div class="html">
        <div class="header">
            <a class="h_home" href="Infrared.html"></a>
            通讯录
            <span class="h_setting"></span>
        </div>
        <div class="body">
            <div class="b_main">
                <asp:Repeater ID="rptJoinMan" runat="server" OnItemDataBound="rptJoinMan_ItemDataBound">
                    <ItemTemplate>
                        <div class="xmmc"><p class="bm_txtitem"  id="proName<%#Container.ItemIndex+1%>"><span>项目名称:</span> <%#Eval("P_Title") %></p></div>
                        <div id="Base<%#Container.ItemIndex+1%>"></div>
                        <asp:Repeater ID="rptName" runat="server">
                            <ItemTemplate>
                                <p class="bm_txtitem"><a class="bm_txtitem" href="/UserInfo_<%#Eval("ID") %>.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务人员:<%#Eval("U_Name") %></a></p>
                            </ItemTemplate>
                        </asp:Repeater>
                        <%--<asp:Panel ID="pl<%#Eval("P_ID") %>" runat="server">暂无数据</asp:Panel>--%>
                        <div id="dv" class="bm_txtitem" runat="server" style="text-align: left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;暂无数据</div>
                        <div id="bottom<%#Container.ItemIndex+1%>"></div>
                        <p class="bm_txtitem"></p>
                    </ItemTemplate>
                </asp:Repeater>
                <div id="pshow" runat="server" class="bm_txtitem" style="text-align: left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;暂无数据</div>
            </div>
            <div class="b_copyright">
    
            </div>
        </div>
    </div>
</body>
</html>
0 0
原创粉丝点击