JavaScript function call at the end of a button click event

How do you call a JavaScript function at the end of a button click event in code?

+3
source share
2 answers

If you are working in .NET, you can try

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

You probably need the onmouseup event:

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

Source: https://habr.com/ru/post/1703088/


All Articles