getElementByID work in firefox, but not in IE & Chrome
function change1() {
document.getElementById("video").src =
document.myvid1.vid_select.options[document.myvid1.vid_select.selectedIndex].value
}
<form name="myvid1">
<select id="vid_select" onChange="change();">
<option value="http://www.youtube.com/v/nN8Si5LKyY?autoplay=1">Test1</option>
<option
value="http://www.youtube.com/v/CdKUtZIDzEg?autoplay=1">Test2</option>
</select>
</form>
<object width="650" height="450">
<embed id="video" src="http://www.youtube.com/v/IiJx4a1cxRk"
type="application/x-shockwave-flash" width="650" height="450" />
</object>
The above code can work in Firefox, but not in IE & Chrome.
No comments:
Post a Comment