Horje
how to call a function when dropdown menu's value is selected in html Code Example
how to call a function when dropdown menu's value is selected in html
var menu = document.getElementById("change_chart");
menu.addEventListener("change", generateData);

function generateData(event) {
  if (menu.value == '1') {
    alert(1);
  } else if (menu.value == '2') {
    alert(2);
  } else if (menu.value == '3') {
    alert(3);
  }
}




Html

Related
block elements Code Example block elements Code Example
nested select option in html Code Example nested select option in html Code Example
href in spring mvc Code Example href in spring mvc Code Example
html mobile does not show pdf with object Code Example html mobile does not show pdf with object Code Example
how to redirect to another page when a login button is clicked Code Example how to redirect to another page when a login button is clicked Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9