Just remember the value. Is there a proper earth ground point in this switch box? Use the following code instead: The .change(handler) method is a shortcut for .on("change", handler). If a law is new but its interpretation is vague, can the courts directly ask the drafters the intent and official interpretation of their law? onchange="myFunction()">, W3Schools is optimized for learning and training. Another approach wich can be handy in some situations, is passing the value of the selected