[Solved] If function in drop down list using JavaScript [closed]
function myFunction() { var internetElem = document.getElementById(“internet”); var internet = internetElem.options[internetElem.selectedIndex].value; var computerElem = document.getElementById(“computer”); var computer= internetElem.options[internetElem.selectedIndex].value; if (internet==”no”||computer==”yes”) { x=”check your cable is not cut or loose”; } else if (internet==”no”||computer==”yes”) { x=”connection problem”; } else { x=”other problems….”; } document.getElementById(“Solution”).innerHTML=x; } You need something like above. Just find an element by its … Read more