在ASP.NET开发中,使用自带的alert不够美观,使用SweetAlert插件可以直接调用。

使用方法:
在前端添加label
<asp:Label ID="lable_tip" ViewStateMode="Disabled" runat="server"></asp:Label>
在后台调用:
this.lable_tip.Text = "<script>swal('温馨提示','信息有误,请检查账号或者密码!','error')</script>";
本文介绍如何在ASP.NET开发中使用SweetAlert插件替代默认的alert对话框,通过前后端结合的方式实现更美观的提示效果。
在ASP.NET开发中,使用自带的alert不够美观,使用SweetAlert插件可以直接调用。

使用方法:
在前端添加label
<asp:Label ID="lable_tip" ViewStateMode="Disabled" runat="server"></asp:Label>
在后台调用:
this.lable_tip.Text = "<script>swal('温馨提示','信息有误,请检查账号或者密码!','error')</script>";
2265

被折叠的 条评论
为什么被折叠?