如何弹出确认框? [英] how to popup confirm box?

查看:80
本文介绍了如何弹出确认框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单击asp:commandfield删除按钮后如何弹出确认框?

how to popup confirm box after click of asp:commandfield delete button?

推荐答案


请参阅此链接....

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ConfirmButton/ConfirmButton.aspx [ ^ ]
Hi,
refer This Links....

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ConfirmButton/ConfirmButton.aspx[^]


您可以使用javascript alert命令或使用ajaxcontroltoolkit中的Confirmbuttonextender.您还可以通过创建div并放置消息和按钮来创建自己的弹出窗口.或者,您也可以使用模式弹出窗口扩展程序来创建自己的弹出窗口.供您参考:

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/ [
You can use the javascript alert command or use confirmbuttonextender af the ajaxcontroltoolkit. you can also make your own popup by making a div and place a message and buttons. Or u can also use modal popup extender to create your own popup. For your reference:

http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/[^]

Best regards,
Eduard


您的asp按钮上的javascript函数放在OnClientClick事件上.

on your asp button put the javascript function on OnClientClick event.

<asp:button id="btnDel" runat="server" text="DELETE" onclientclick="delFunc()" xmlns:asp="#unknown" />



在javascript中使用jquery



in javascript use jquery

/*this is javascript*/
function delFunc()
{
 if(confirm("Are you sure want to delete?"))
 {
  .........
   call the code behind function/method using jquery.ajax();
  .........
 }
}


这篇关于如何弹出确认框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆