为什么那个jquery对话框在firefox中不起作用?这在IE中运行得非常好。我使用了jqueryblockui.js pug-in。
function showConfirmation(progTit, msgText, msgIcon, msgHideIcon) {
var tblMsg;
tblMsg = '<table width="310" cellpadding="0" cellspacing="0" border="0" height=113px >' +
'<tr style="background-color:#3a3a3a;">' +
'<td style="width:30px;" valign="middle"></td>' +
'<td style="height:2px; text-align:center; color:#ffffff; font-style:bold;">' + progTit + '</td>' +
'<td height="1px">' +
'<a href="javascript:void(0);" onclick="$.unblockUI();"><img src="' + msgHideIcon + '" alt="Hide" title="Hide" style="border:0;"/></a>' +
'</td>' +
'</tr>' +
'<tr>' +
'<td style="width:30px;" valign="middle"></td>' +
'<td style="text-align:center;"><img src="' + msgIcon + '"/> ' + msgText + '</td>' +
'<td style="width:30px;" align="center" valign="middle"></td>' +
'</tr>' +
'</table>';
$('#divConfirm').html(tblMsg);
$.blockUI({ message: $('#divConfirm') });
答案 0 :(得分:0)
这一个:)
<script>
function showConfirmation(progTit, msgText, msgIcon, msgHideIcon) {
var tblMsg = '<table width="310" cellpadding="0" cellspacing="0" border="0" height=113px >'
+ '<tr style="background-color:#3a3a3a;">'
+ '<td style="width:30px;" valign="middle"></td>'
+ '<td style="height:2px; text-align:center; color:#ffffff; font-style:bold;">' + progTit + '</td>'
+ '<td height="1px">'
+ '<a href="javascript:void(0);" onclick="$.unblockUI();"><img src="' + msgHideIcon + '" alt="Hide" title="Hide" style="border:0;"/></a>'
+ '</td>'
+ '</tr>'
+ '<tr>'
+ '<td style="width:30px;" valign="middle"></td>'
+ '<td style="text-align:center;"><img src="' + msgIcon + '"/> ' + msgText + '</td>'
+ '<td style="width:30px;" align="center" valign="middle"></td>'
+ '</tr>'
+ '</table>';
$.blockUI({ message: tblMsg });
}
$(function() {
showConfirmation('Title', 'Hello World', '', '')
});
</script>