The onChange event occurs when the users alters the input into a form elements, such as a text box. In the following example, we shall show you how this event triggers a pop-up message when the user enters something into a textbox and alter its content. When the user loads the web page that contains the script, a textbox will appear at the top of the web page. When enters something into the textbox, alters it and then click outside the textbook, he will see a pop-up dialog then reads “You have changed the content”