2011-02-09 2 views
-1
<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 

답변

1

첫째는

< ID = "lnktochange"HREF = "비디오 테스트 할 수 있도록 내가 하이퍼 링크 요소에 (당신은 또한 일부 CSS 클래스를 추가 할 수 있습니다) ID를 추가 오전에 삽입 조작 .MP4 "> </A>

$ (문서) .ready (함수() {

$ ("#의 lnktochange "). 클릭 (함수 (전자) {

var에 시간 = $ (this) .attr ("href");

$ ("# player2"). attr ("flashvars", h);

e.preventDefault();

});

});