//Display mask
$.blockUI({
message: $('#divlogin'),
css:{width:"400px", height:"255px", top: ($(window).height() - 400) /2 'px', left : ($(window).width() - 400) /2 'px'}
});
//Cancel mask
$("#cancel").click(function() {
$.unblockUI();
});
Unmasking means that the outer layer dynamically generated by js does not disappear.
There is no problem under FF3.0.4 and Chrome, but it is not normal under IE6 IE7 Ie8.
Open the source code and find the following sentence:
var lyr1 = ($.browser.msie) ? $('
')
: $('
');
You can see that under IE, it generates an iframe and loads your own in this iframe dialog box.
So, now just the outer layer does not disappear, you can manually make it disappear.
$.blockUI({ message: $("#dialog ")});
$("#cancel").click(function() {
$.unblockUI();
$(".blockUI").fadeOut("slow");
});
OK, IE6 and IE7 are fine.
After using blockui, the mask layer data cannot be submitted to the background. You can use ajax.
You want to submit it later. After asking for advice, I understand that the mask layer is no longer in the current form, so it cannot be submitted if there is no form after submission
The solution is to place the mask layer part into the form
$('#divlogin').parent().appendTo(jQuery("form:first"));---it is still not completely found and placed The mask layer data outside the form is not very clear.