I believe you can do that without JS by using an HTML form containing the requisite user input fields.