Chetan
Chetan

Reputation: 1567

Calling JavaScript function at the end of button click event

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

Upvotes: 3

Views: 6821

Answers (2)

wegrata
wegrata

Reputation: 1656

If you're working in .NET you could try

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

Upvotes: 6

tehvan
tehvan

Reputation: 10369

You probably want the onmouseup event:

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

Upvotes: -1

Related Questions