我正在编写验证代码,如果发生任何错误,请确认或出现警告对话框。现在我想在警报对话框中保留一个复选框,如果选中该复选框,则应该返回复选框上的值。我尝试使用 jquery-modal 对话框,但它没有帮助我。所以谁能告诉我我该怎么做
问问题
134 次
2 回答
0
Jquery modal 为您完成了这项工作。
下面是设置关闭复选框值的代码。
$(function () {
$("#dialog-confirm").dialog({
resizable: true,
height: 150,
modal: true,
close: function () {
$(this).find(':checked').each(function () {
var name = $(this).attr('name');
$('input[name="' + name + '"]').val('checked '+name);
});
},
buttons: {
"Ok": function () {
$(this).dialog("close");
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
于 2013-06-12T06:53:05.420 回答
0
于 2013-06-12T07:19:36.550 回答