Yep, I'd go about it within the onclick attribute, unless you intend to use it multiple times, then place it into a function and call the function w/ onclick TAGs: JavaScript, jQuery, TextBox, Button The change event triggers when the element has finished changing. Topic: JavaScript / jQuery Prev|Next Answer: Use the value Property You can simply use the value property of the DOM input element to get the value of text input field. Text Value Property This property set/return the value of value attribute of a text field. For text inputs that means that the event occurs when it loses focus. Store javascript return value of a function to the respective Asp Control OnClick event at server side Javascript Onclick event handler How to call javascript confirm from C# button onclick event The button OnSelect forumal is : UpdateContext({RequestStatusVar: "New"}) The Default value of my Request Status field is set to RequestStatusVar. Set the value of an input field in JavaScript. Here, we are going to use the .value property of the DOM element to change the value of the input field. But when we move the focus somewhere else, for instance, click on a button â there will be a change event: On button click, I am getting the input box value and this is tricky and in future post, I will do more this form. Example In this post, I made simple form and input field and input button. ...