返回确认(“您是否要删除此记录");"); [英] return confirm('Do you want to Delete This Record');");

查看:233
本文介绍了返回确认(“您是否要删除此记录");");的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

btn_delete.Attributes.Add("onclick",返回确认("是否要删除此记录);");
但是,当我在确认框中单击取消"时,btn_delete客户enevr将不应该触发.

btn_delete.Attributes.Add("onclick", "return confirm(''Do you want to Delete This Record'');");
but when i click on cancel in confirmation box then btn_delete client enevr fire it should not be . how it is done

推荐答案

您可以像这样使用,

You can use like this,

btn_delete.Attributes.Add("onclick", "if(confirm('Are you sure that you want to delete this comment?')){return true;} else {return false;};");


,您还可以在< asp:button中添加OnClientClick ="return Confirm(``确定要删除此用户吗?''))" ... ."/>
you can also add OnClientClick="return confirm(''Are you certain you want to delete this User?'')" in <asp:button ...." />


使用按钮的OnclientClick事件
返回确认(确定要删除此角色吗?");"
Use OnclientClick event of button
return confirm(''Are you sure you want to delete this Role?'');"


这篇关于返回确认(“您是否要删除此记录");");的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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