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