Call a function based on the onchange-event
StackOverflow Question:My Answer I have been used addEventListener in change state so that it will easy to call two different functions by select tag HTML. Check the link given below. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <h1 id="eg"></h1> <select id = "nextGeneration" > <option value="1">1</option> <option value="2">2</option> </select> <script type="text/javascript"> document.getElementById("nextGeneration").addEventListener("change", function(){ if(document.getElementById("nextGeneration").value == "1") { F1(); } else if (document.getE...