A client-side javascript snippet to perform action based on the modification of a input field from the user