在按钮单击事件结束时调用JavaScript函数

时间:2009-02-12 12:36:48

标签: javascript .net asp.net code-behind

如何在代码后面的按钮点击事件结束时调用JavaScript函数?

2 个答案:

答案 0 :(得分:6)

如果您在.NET中工作,可以尝试

ScriptManager.RegisterClientScriptBlock(myButton, this.GetType(), "BlockName", "alert('hello world');", true);

答案 1 :(得分:-1)

你可能想要onmouseup事件:

<button onmouseup="alert('You release the mouse button!')">Click me</button>