JSFiddle - React, Tailwind, and code Playground
HTML
<select id="list" onchange="showDate();" >
<option value="0">Seleccione</option>
<option value="1">Opcion 1</option>
</select>
JavaScript
function showDate()
{
var xmlhttp;
var ex=document.getElementById("list");
//var id=ex[ex.selectedIndex].id;
var id = document.getElementById("list").value;
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("dt").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","schdl2.php?f="+id,true);
xmlhttp.send();
//loadDetails();
}