Skip to content
Advertisement

Appending dropdown selection to url

I’m trying to append the dropdown selection to the url.

This selection part

JavaScript

Then the call sign

JavaScript

Final the append to url sign

JavaScript

But as the result comes &adults=object%... instead of &adults=1 or 2 or 3 or 4.

Advertisement

Answer

If you want to get the value:

JavaScript

However, if you want to get the selected text from drop-down:

JavaScript

Refer to this post: https://learn.jquery.com/using-jquery-core/faq/how-do-i-get-the-text-value-of-a-selected-option/

Advertisement