I want to have a drop down with options but have a default value printed in the box. How do I select its input in js and print something in it?
I tried this:
$('.country input').val("United States");
Which did not work.
I want to have a drop down with options but have a default value printed in the box. How do I select its input in js and print something in it?
I tried this:
$('.country input').val("United States");
Which did not work.
I am delighted to tell you that this is doable without JavaScript. Click the number next to a choice to make it the default.
You want the drop-down to display placeholder text? Or, do you want it to display one of the options as the default?
Actually, one of the options would probably be better. I was just thinking that I would print text out then if they want to change it they would select something from the drop down and it would replace what I had printed. But if it just displays one of the options that would be wonderful.