Code
Execute
<!DOCTYPE html> <html> <head> <title>html tutorial - html5 - html code - html form - In 30Sec by Microsoft Award MVP - | wikitechy onchange attribute</title> </head> <body> Select Wikitechy Tutorial :<br><br> <select name="tutorial" onchange="onChange(this.value)"> <option value="HTML">Wikitechy HTML</option> <option value="CSS"> Wikitechy CSS</option> <option value="PHP"> Wikitechy PHP</option> </select> <script> function onChange(val) { alert("The Value Changed as : " + val); } </script> </body> </html>
Result