我有 ffmp3 嵌入代码,并试图用 javascript 更改 flashvars 参数值,这可能吗?
我走了这么远,但没有运气:
<a id="foo" href="#">Change Radio</a>
<object width="205" height="109" bgcolor="#FFFFFF">
<param name="movie" value="ffmp3-config.swf" />
<param name="flashvars" value="Radio1" />
<param name="wmode" value="transparent" />
<param name="scale" value="noscale" />
<embed src="ffmp3-config.swf" flashvars="url=Radio1" width="205" scale="noscale" height="109" wmode="transparent" bgcolor="none" type="application/x-shockwave-flash" />
</object>
<script type="text/javascript">
var foo = document.getElementById('foo');
foo.onclick = function () {
document.getElementsByName('flashvars')[0].value='Radio2';
}
</script>