显示确认编辑前 [英] Show confirmation Before editing
本文介绍了显示确认编辑前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我把这个功能:
i put this function:
<script type="text/javascript">
function doConfirm() {
return confirm('Are you sure you wish to continue?');
}
</script>
但如何通过按钮调用它?????
but how call it from the button?????
<input type="submit" value="Edit"/>
推荐答案
试试这个:
Hi,
Try this:
<input type="submit" value="Edit" onclick="doConfirm()" />
希望这有帮助。
Hope this helps.
如果您使用ID为Button1的ASP.Net按钮,请尝试在页面加载事件中添加此行:
If you are using ASP.Net button with id "Button1" then try adding this line in page load event:
Button1.Attributes.Add("onclick","doConfirm();");
这篇关于显示确认编辑前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文