Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Detect Change in Input Field</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ $("#myInput").on("input", function(){ // Print entered value in a div box $("#result").text($(this).val()); }); }); </script> </head> <body> <p><input type="text" placeholder="Type something..." id="myInput"></p> <div id="result"></div> </body> </html>