how to take user input in javascript without prompt