In Association with Amazon.in   Flipkart

Tuesday, November 19, 2013

JavaScript OnChange Event Example

JavaScript OnChange Event: When we change option on the combo box/Drop Down List.

Example:

<body>
Open Site:
<select name="sites" onChange="document.getElementById('fm1').src=this.value;">
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.sify.com">Sify</option>
</select>
<hr/>
<iframe src="http://www.google.com" width="600px" height="550" frameborder="1" name="frm1" id="fm1" ></iframe>
</body>


No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...