I am new to coding and I am currently working on an assignment. I basically need to build a very basic webpage in which I can ask questions to users and then suggest a vacation destination using their answers.
I used a select dropdown box with options for the user. I am now on the js part and I cannot figure out how to get their input.
this is my code for one of the boxes:
<div class="container">
<h1>Let's find your ideal vacation getaway!</h1>
<div id="userinput">
<form>
<div class="form-group">
<label for="question1">1.What is your favorite cuisine?</label>
<select class="form-control">
<option></option>
<option>Mexican</option>
<option>Italian</option>
<option>Indian</option>
<option>Caribbean</option>
</select>
My question is, what function do I utilize to get their answers, thus allowing me to use branching to generate results. I am sorry if this is confusing, like I said, I am very new to this.
Thanks in advance!
Mexico
'); } $("#output").text(result); – Vanessa Sharma Jun 11 '16 at 16:37