[英]Confirmation box click No button, uncheck the Grid check box cell ExtJs
[英]Confirmation Box on specific button click
当用户点击网页上的“保存”按钮时,我需要弹出一个确认框。 我目前有一个确认框,每当用户单击ANY按钮时,就会显示。 我只需要一个。 我需要它链接到的按钮称为btnsavesurvey。
这是我当前在page_load中的代码:
Dim message As String = "Do you want to complete survey?"
Dim sb As New System.Text.StringBuilder()
sb.Append("return confirm('")
sb.Append(message)
sb.Append("');")
ClientScript.RegisterOnSubmitStatement(Me.GetType(), "alert", sb.ToString())
$('#btnsavesurvey').click(function(){
var r = confirm("Your message");
if (r == true) {
alert("You pressed OK!");
// Do something when the user pressed ok
} else {
alert("You pressed Cancel!");
// Do something when the user pressed cancel
};
});
如果您的btns id为btnsavesurvey,而其类为btnsavesurvey,则使用.btnsavesurvey
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.