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>
Share with

Leave a Reply

Start typing and press Enter to search