<object id="player" name="player" width="671" height="442">
<param name="movie" value="player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=video/video.mp4&image=preview.jpg" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player.swf"
width="671"
height="442"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=video/video.mp4" -------FLASHVARS
/>
</object>
<a href="video-test.mp4"><img></img></a>----------------- if i click this iwant the value of this href to be the in the FLASHVARS
答案 0 :(得分:1)
首先我要添加id(你也可以添加一些css类)到你的超链接元素,所以它将是
&LT; a id =“lnktochange”href =“video-test.mp4”&gt;&lt; / A&GT;
(文档)$。就绪(函数(){
$( “#lnktochange”)。单击(函数(E){
var h = $(this).attr(“href”);
$( “#player2”)ATTR( “Flash变量”,H);
e.preventDefault();
});
});