弹出窗口跟随scrollbar位置

<script type="text/javascript">

    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(PageLoad);

    function PageLoad()
    {
        document.getElementById('<%=popUpMsg.ClientID %>').style.top=document.documentElement.scrollTop + 100 ;

    }    
  window.onload=PageLoad;
</script>

 

<div ID="popUpMsg" runat="server" Width="420px" Height="420px" Left="25%">

......

posted on 2008-08-26 13:57  大米_dr  阅读(407)  评论(0编辑  收藏  举报