Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在后面的代码中,如何在按钮单击事件结束时调用 JavaScript 函数?
如果您在.NET 中工作,您可以尝试
ScriptManager.RegisterClientScriptBlock(myButton, this.GetType(), "BlockName", "alert('hello world');", true);
您可能想要 onmouseup 事件:
<button onmouseup="alert('You release the mouse button!')">Click me</button>