当我单击链接时,Jquery Messagebox MVC3
我认为
<tr>
<td>@Model.EnrolledPolicies[i].InsuredName</td>
<td>@Model.EnrolledPolicies[i].ProductType</td>
<td>@Model.EnrolledPolicies[i].PolicyNumber</td>
<td>@Model.EnrolledPolicies[i].IssueDate</td>
<td>@Model.EnrolledPolicies[i].Status</td>
<td>
@if (Model.EnrolledPolicies[i].CanViewContractDetails)
{
@Html.ActionLink("View Details", "ViewContractDetails", new { @Contract=Model.EnrolledPolicies[i].PolicyNumber });
}
else
{
<a href="#">View Details</a>
}
</td>
</tr>
在上面的 else 语句中我想为 Jquery 消息框编写一些代码。当我从 else 语句中单击“查看详细信息”时,应该会出现一个消息框,提示访问受到限制。有人可以帮我解决这个问题吗?
I have this in my view
<tr>
<td>@Model.EnrolledPolicies[i].InsuredName</td>
<td>@Model.EnrolledPolicies[i].ProductType</td>
<td>@Model.EnrolledPolicies[i].PolicyNumber</td>
<td>@Model.EnrolledPolicies[i].IssueDate</td>
<td>@Model.EnrolledPolicies[i].Status</td>
<td>
@if (Model.EnrolledPolicies[i].CanViewContractDetails)
{
@Html.ActionLink("View Details", "ViewContractDetails", new { @Contract=Model.EnrolledPolicies[i].PolicyNumber });
}
else
{
<a href="#">View Details</a>
}
</td>
</tr>
In the above else statement I would like to write some code for a Jquery message box. When I click on "View Details" from the else statement, a message box should be appearing saying Access is restricted. Can someone help me on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
试试这个 jQuery UI 插件: JQuery UI Message Box
try this jQuery UI plugin: JQuery UI Message Box
使用 jQuery UI 插件:
注意:通过应用类来设置对话框
div
的样式,使其默认隐藏。Using jQuery UI plugin:
Note: Style the dialog
div
by applying a class so that its hidden by default.您可以使用 jQueryUI 来做到这一点。
看一下: http://jqueryui.com/demos/dialog/#modal-message< /a>
You can use jQueryUI to do that.
Take a look at: http://jqueryui.com/demos/dialog/#modal-message
不确定在这种情况下您是否真的需要 jquery 消息框,因为警报消息将满足您的请求。仅供参考,以下代码将在单击“查看详细信息”时显示简单的警报消息
Not sure if you really need the jquery message box in this case since an alert message will satisfy your request. FYI, the following code going to display a simple alert message when View Details is clicked