bname.value="play"
}
}
</script>
很简单.通过一个条件逻辑来判断,是否播放.通过传递的参数song来决定播放的曲目..
由于脚本语言,并不强调类型,而是运行时动态绑定.并且它并不存在编译环节.因此不用事先申明.html中的运行标签如下:
<img name="mid" dynsrc="about:blank" loop="infinite" width="1" height="1">
<input type="button" id="bname"
onclick=play(midselect.options[midselect.selectedindex].value) value=play style="color: #ffffcc; border-style: outset; border-width: 0" />
<select size="1" name="midselect"
onchange=play(midselect.options[midselect.selectedindex].value)>