클라이언트 용 smalle 웹 응용 프로그램을 가지고 있지 않습니다. Firefox, Chrome, IE7, IE8 및 IE9에서 테스트했습니다.Jquery 대화 상자 IE9 콘텐츠가 html로 표시되지 않습니다.
이제는 실패 할 수 없습니다. 내가 테스트 한 모든 브라우저/버전에서 작동합니다. 내 고객이 앉아있는 것이 확실하지 않지만 IE9라고했습니다.
코드는 이것이다 :
function noticeBox(type, html, title) {
switch(type) {
case 1:
$('#notice_box').dialog({
title: title,
width: 400,
modal: true,
position: 'center',
buttons: {
'Ok': function() {
$(this).dialog('close');
}
}
});
break;
case 2:
$('#notice_box').dialog({
title: title,
width: 800,
modal: true,
position: 'center',
buttons: {
'Bekræft og bestil': function() {
$('#form_products').submit();
},
'Annuller': function() {
$(this).dialog('close');
}
}
});
break;
case 3:
$('#notice_box').dialog({
title: title,
width: 400,
modal: true,
position: 'center',
buttons: {
'Luk': function() {
$(this).dialog('close');
}
}
});
break;
}
alert(html);
$('#notice_box').html(html);
$('#notice_box').dialog('open'); }
아니 아주 일반적인 기능을하지만 순간에 실패 이잖아. 그는 대화 상자 팝업이 대화 상자에 내용이 없을 때 말합니다. 그는 버튼을 볼 수 있지만 대화 자체에는 HTML이없는 것처럼 보입니다.
아이디어가 있으십니까?
업데이트 : Btw는 여러 대화 상자를 활성화 할 수 있으며 결과는 모두 동일합니다. 내용이없는 대화 상자.
UPDATE2 :이 기능을 사용하는 예는 다음과 같습니다.
function order() {
var procuct_str = '';
var found_order = false;
$.each($('.order_input'), function(){
var product_id = $(this).attr('id').split('-');
if(parseInt($(this).val()) > 0) {
found_order = true;
procuct_str = procuct_str+'<div class="float_left"><span class="bread_text">'+$('#description-'+product_id[1]).text()+'</span></div><div class="float_right"><span class="bread_text">'+$(this).val()+'</span></div><div class="clear"></div>';
}
});
if(found_order == true) {
procuct_str = '<div class="float_left"><b>Beskrivelse</b></div><div class="float_right"><b>Antal kasser</b></div><div class="clear"></div>'+procuct_str;
noticeBox(2, procuct_str, 'Bekræftelse');
var found_order = false;
} }
함수 함수 noticeBox (type, html, title) {html을 사용해야하고 함수의 맨 아래에 html을 사용할 때 $ ('# notice_box'). html (html); –