Div样式:
#dimmer 
{
display: none;
position: absolute;
top: 0;
left: 0;
background: #000000;
filter:alpha(opacity=50);   /* Internet Explorer       */
-moz-opacity:0.5;           /* Mozilla 1.6 and below   */
opacity: 0.5;               /* newer Mozilla and CSS-3 */
}
#sessionNoticeBox
{
border: 2px #aaaaaa solid;
position: absolute;
top: 50%;
left: 50%;
padding: 20px;
margin: auto;
width: 300px;
padding-top: 40px;
height: 90px;
text-align: center;
margin-left: -200px;
margin-top: -100px;
background-color: #ffffff;
filter:alpha(opacity=100);  /* Internet Explorer       */
-moz-opacity:1.0;           /* Mozilla 1.6 and below   */
opacity: 1.0;               /* newer Mozilla and CSS-3 */
}
    以下是删除Div的代码
if ($('#dimmer').length > 0) {
        $('#dimmer').remove();
        $('#sessionNoticeBox').remove();        
    }

解决方案 »

  1.   


        <script type="text/javascript">
            $(document).ready(function () {
                if ($('#dimmer').length > 0) {
                    $('#dimmer').remove();
                    $('#sessionNoticeBox').remove();
                }
            });
        </script>
    火狐没问题啊
      

  2.   

    不会吧,我在两台电脑上做了测试,火狐,chrome,360浏览器都出现一样的问题,需要左键单击页面DIV才消失,用firebug调试又没有问题,我做是一个loaidngPage的功能,以下是显示和卸载的代码
    MYSales.DisplayLoadingLockLayer = function(){
        if ($('#dimmer').length > 0){
            $('#dimmer').remove();
            $('#sessionNoticeBox').remove();
        }
        var txtNoticeText="Please wait while the page loads";
        var imgSrc="images/AKBase/ani-processing.gif";
        var imgWidth="129";
        var imgHeight="20";
        $('body').append('<div id="dimmer"></div><div id="sessionNoticeBox"><span id="LoadingNoticeText">'
            +txtNoticeText+'</span><br/><br/><Image id="imgLoadingImage" src="'+imgSrc+'" width="'+imgWidth+'" height="'+imgHeight+'" /></div>');
        $('#dimmer').show();
        $('#sessionNoticeBox').show();
        $('#dimmer').css('width', ($(document).width()) + 'px');
        $('#dimmer').css('height', ($(document).height()) + 'px');
        window.focus();
        $('#imgLoadingImage').focus();
        return true;
    }MYSales.RemoveLoadingLockLayer = function(){
        if ($('#dimmer').length > 0) {
            $('#dimmer').remove();
            $('#sessionNoticeBox').remove();        
        }
    }