How to Detect Change in a Text Input Box in jQuery

  3160 views   2 years ago jQuery

Use the input Event

You can bind the input event to an input text box using on() method to detect any change in it.

The following example will display the entered value when you type something inside the input field.

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery Detect Change in Input Field</title>
<script src=""></script>
    $("#myInput").on("input", function(){
        // Print entered value in a div box
    <p><input type="text" placeholder="Type something..." id="myInput"></p>
    <div id="result"></div>


Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]