JSFiddle - React, Tailwind, and code Playground

by Louis Walch

HTML

<select>
      <option selected disabled>Choose</option>
      <option value="//www.google.com" target="_blank">New Window</option>
      <option value="//www.google.com">Same Window</option>      
    </select>

JavaScript

$('SELECT').change(function(e) {

        e.preventDefault();

        var val = $(this).find(':selected');

        if (val.attr('target') == '_blank') {
            window.open($(this).val(), '_blank');
        } else {
            document.location.href = $(this).val();
        }

        return false;

    });