[Solved] how to get user input [closed]
Your error is because you used the wrong ID. getNumber is the button’s ID and you need to use the input‘s ID like this : $(document).ready(function() { $(‘#getNumber’).click(function(event) { alert(localStorage.getItem(“maxnum”)); alert($(‘#input1’).val()); }); }); solved how to get user input [closed]