Run ยป
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"> </script> <script> count = 0; $(document).ready(function(){ $("input").keypress(function(){ $("#message").text(count = count+1); }); }); </script> </head> <body> Write anything here: <input type = "text"> <p>The current characters count in the textbox is: <span id="message">0</span></p> </body> </html>