Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
HEADER [cont'd]
MOUSE EVENTS [cont'd]
onchange in KEYBOARD EVENTS of HTML 4
1050 Views
Usage 
The onchange event will get triggered when value of the element get changed.
Example
<html>
<body>

<p>Select your option</p>

<select id="mySelect" onchange="myFunction()">
  <option value="1">1
  <option value="2">2
  <option value="3">3

</select>


<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("mySelect").value;
    document.getElementById("demo").innerHTML = "You option: " + x;
}
</script>

</body>
</html>
Next Topics
Next lessons of current book.
KEYBOARD EVENTS of HTML 4
KEYBOARD EVENTS of HTML 4
FORM EVENTS of HTML 4
FORM EVENTS of HTML 4
Previous Topics
Previous lessons of current book.
KEYBOARD EVENTS of HTML 4
KEYBOARD EVENTS of HTML 4
KEYBOARD EVENTS of HTML 4
MOUSE EVENTS of HTML 4
MOUSE EVENTS of HTML 4
Best Lessons of "HTML 4"
Top lessons which are viewed more times.
TEXT FONT STYLE of HTML 4
KEYBOARD EVENTS of HTML 4
FORM EVENTS of HTML 4
COMPONENTS of HTML 4
FORM EVENTS of HTML 4
MOUSE EVENTS of HTML 4
COMPONENTS of HTML 4
PAGE EVENTS of HTML 4
KEYBOARD EVENTS of HTML 4
MOUSE EVENTS of HTML 4
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details