Dropdowns – Web Development

Dropdowns – Web Development


There’s one last form element I’d like to expose you to before we move on to something else, and this is for doing a Dropdown. I’m going to get rid of this text here. And a Dropdown has a form that looks like this. It has a element, with a name– we’ve been calling everything “q”, so why stop– and then it has a couple of elements. So here I’ve put in a complete Select element. We’ve got an opening and closing . And the opening has the Name attibute equal to “q”– which is what we’ve been using– and then I’ve added 3 elements. Each has the text inside it: one, two, and three. Let’s see how this looks in our browser. Okay. So here we are in our browser–and now we see we have a Dropdown, and it has a couple of Options. And you can choose one of these Options–you know– one, two, or three–and what I’d like you to tell me is what happens– when I select “two” from the Dropdown and click Submit, what appears in the URL? Okay–so when we select “two” from the Dropdown, what will the value of the “q” parameter in the URL be? Go ahead and give this a try yourself.

Be the first to comment

Leave a Reply

Your email address will not be published.


*