代码:
<div id="dialog-confirm">
Reward added to Employee
</div>
$("#AddReward").click(function ()
{
EmployeeId=JSON.stringify(currentEmployeeId=@Model.EmployeeId)
GivenOn=JSON.valueOf(givenOn=@Model.GivenOn)
$.ajax({
type: "POST",
url: "@(Url.Action("AddRewardToEmployee", "Employee"))",
data: {
"employeeId":EmployeeId,
"givenOn":GivenOn
},
success: function (data)
{
$("#dialog-confirm").dialog({
resizable: false,
modal: true,
title: "Resource Added",
height: 200,
width: 300,
buttons: {
"Ok": function (e)
{
$(this).dialog('close');
window.location.href="/Employee/Edit?employeeId="+@Model.EmployeeId;
}
}
});
},
});
});
背景
在AddRewardToEmployee操作中,我向员工添加奖励,然后我想显示该奖励的弹出窗口已成功添加。
问题:
操作方法,即AddRewardToEmployee工作正常但弹出窗口没有显示。脚本中有什么问题吗?