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>
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