how to capture user input in javascript