【发布时间】:2017-08-02 05:07:39
【问题描述】:
以下代码在 Asp.Net 上运行带有 Javascript 的确认框。
我需要更改按钮文本。如何在此消息框中使用是或否按钮?
谢谢。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Confirmation</title>
<script type="text/javascript">
function ConfirmOnDelete() {
if (confirm("Some question") == true)
return true;
else
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return ConfirmOnDelete();" OnClick="Button1_Click"/>
</div>
</form>
</body>
</html>
【问题讨论】:
标签: jquery asp.net messagebox confirmation