Run
Reset
Chrome
Cobalt
Monokai
Dreamweaver
Vibrant Ink
<!DOCTYPE html> <html lang="en"> <head> <title>Learning jQuery</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> </head> <body> <input type="number"/> <div id="output"></div> </body> </html>
/* CSS */
$(document).ready(function(){ $("input[type='number']").change(function(){ var x = $(this).val(); $('#output').text(`Value is : ${x}`); }); });