如何在按钮的onclientclieck事件中调用两个不同的和manadatory函数? [英] How to call two different and manadatory function in onclientclieck event of button?

查看:205
本文介绍了如何在按钮的onclientclieck事件中调用两个不同的和manadatory函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OnClientClick =返回确认('您确定要删除此标题吗?'); window.location.reload();



我试过这...

OnClientClick="return confirm('Are you sure you want to delete this Heading?'); window.location.reload();"

I tried this ...

推荐答案

从第一个函数调用第二个函数。你可以使用try ... catch ... finally块来确保调用window.location.reload()而不管try ... catch的状态。



希望这有助于
Call the second function from the first. you could use a try...catch...finally block to ensure that the window.location.reload() is called irrespective of the status of the try...catch.

Hope this helps


这篇关于如何在按钮的onclientclieck事件中调用两个不同的和manadatory函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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