Redirect to URL on HTML Select option change

<select class="form-select lang-select" aria-label="Language Change"  onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
    <option disabled>Language</option>
    <option value="https://google.com" selected>English</option>
    <option value="https://yahoo.com">Arabic</option>
</select>

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *