JSFiddle - React, Tailwind, and code Playground
by Paulpro
HTML
<form name="countrySelector" id="countrySelector">
<select name="file" size="1">
<option value="empty">Select</option>
<option value="http://www.facebook.com/">Argentina</option>
</select>
</form>
JavaScript
function loadPage(list) {
var a = document.createElement('a');
a.href = list.options[list.selectedIndex].value;
a.setAttribute('target', '_blank');
fireEvent(a, 'click');
}
function fireEvent(obj,evt){
var fireOnThis = obj;
if( document.createEvent ) {
var evObj = document.createEvent('MouseEvents');
evObj.initEvent( evt, true, false );
fireOnThis.dispatchEvent(evObj);
} else if( document.createEventObject ) {
fireOnThis.fireEvent('on'+evt);
}
}
document.getElementsByTagName('select')[0].onchange = function(){
loadPage(this.form.elements[0]);
}