<a id="bgndVideo" href="http://www.youtube.com/watch?v=mAf6zKRb1wI"
class="movie {opacity:.8, isBgndMovie:{width:'window',mute:false}, o
ptimizeDisplay:true, showControls:true, ratio:'4/3', loop: true}">vito
acconci theme song 1973</a>
以上是我在文档中用于嵌入javascript chromeless youtube播放器作为背景的html。我得到的代码从http://pupunzi.com/mb.components/mb.YTPlayer/demo/demo_background.html使用jquery利用dyanamically更改javascript youtube播放器的href
href控制设置为背景的视频我想用常量动态更改上述html的href。
我曾尝试:
var DATA = VideoID
$("bgndVideo").attr("href", DATA)
这个没有工作,也没有
document.getElementById("bgndVideo").href=DATA;
这也不能工作。有什么建议么?在上面的示例网站上查看源代码以更好地了解我的意思可能是一个好主意,我觉得很难正确表达我的问题!
您已经回答了如何将URL更改为一组网址。问题是如何将url更改为变量。 – user2330012 2013-04-28 23:22:03