Question

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

Was it helpful?

Solution

If you're working in .NET you could try

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

OTHER TIPS

You probably want the onmouseup event:

<button onmouseup="alert('You release the mouse button!')">Click me</button>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top