我想在屏幕中心显示确认。 我的观点:
<table id="test" class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Value</th>
<th>Message</th>
<th>EffectiveDate</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.LookupValues)
{
<tr>
<td>@Html.DisplayFor(m => item.Value)</td>
<td>@Html.DisplayFor(m => item.Message)</td>
<td>@Html.DisplayFor(m => item.EffectiveDate)</td>
<td>
@Html.ActionLink("DeleteTEST", "Delete", "Values", new { area = "Admin", id = item.LookupValueKey }, new { @class = "deleteTEST" })
</td>
</tr>
}
</tbody>
</table>
jQuery的:
$('.deleteTEST').click(function () {
var answer = confirm('Do you want to delete this record?');
if (answer) {
$.post(this.href, function () {
window.location.reload(); //Callback
});
return false;
}
return false;
});
显示在屏幕顶部。
任何人都可以告诉如何在中心显示此确认。