使用asp.net web应用程序中的以下消息框。现在我想将此消息框转换为确认消息框并在其为真时执行其他操作否则意味着拒绝该应用程序。
ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "confirm('Address,Phone Number,Email ID Is Empty Do You Want To Continue');", true);
答案 0 :(得分:0)
<body>
<p>Click the button to display a confirm box.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x;
var r=confirm("Press a button!");
if (r==true)
{
x="You pressed OK!";
}
else
{
x="You pressed Cancel!";
}
}
</script>
</body>