<script type="text/javascript">
$('.Ok').live('click', function () {
$("#popUp").dialog("close");
$('#mydiv').html("");
$.ajax({
url: "/HRBankInfo/_Partial",
type: "Get",
datatype: String,
success: function (stu) {
$('#mydiv').append(stu);
}
});
});
</script>
我的 html 代码 这是我的 HTML 表单...
<h3>Are you sure you want to delete this Address?</h3>
<fieldset id="_Create">
<legend>Confirm Delete</legend>
@using (Html.BeginForm())
{
foreach (var item in Model.classes)
{
<div class="display-label">Bank Description:</div>
<span>Bank Name :</span>@Html.DisplayFor(BName => item.BName)
<p><span>Address :</span>@Html.DisplayFor(BAdd=>item.BAdd)</p><br />
}
<input type="submit" value="Yes" />
<button class="close">No</button>
}
</fieldset>
因此是将值加载到除法的脚本
<script type="text/javascript">
$(function () {
$('form').submit(function () {
$.ajax({
url: this.action,
type: this.method,
data: $(this).serialize(),
success: function (result) {
$('.popUp').html(result);
}
});
return false;
});
});
</script>
这是弹出对话框的脚本
<script type="text/javascript">
$(function () {
$('form').submit(function () {
$(".popUp").dialog({
resizable: false,
modal: true
}
);
});
});
</script>
<div class="popUp" title="Message">
</div>
谢谢您的帮助
上面的代码仅适用于一个弹出窗口。如何一次关闭多个弹出窗口感谢您的帮助。