嗨,我很新的JavaScript。我有一個.webm和.mp4視頻源,但是如何在javascript中添加另一個源代碼,我只能設置1(webm),我需要添加另一個代碼的代碼是什麼?Javascript增加2個視頻來源
謝謝您提前。
嗨,我之所以需要把JS是因爲DivX的插件更換HTML5視頻元素,如在此線程Prevent divx web plugin fron replacing html5 video element?
這裏是我的代碼
<script type="text/javascript">
function changevid() {
document.getElementById('vid').innerHTML = '<source src="http://avalonplay.com/video/loginvideo.webm" type="video/webm" />';
document.getElementById('vid').load();
}
</script>
<body onload="changevid()">
<video id="vid" width="800" height="450" loop="loop" preload="auto" autoplay style="width: 100%; height: auto; margin:0; right: 0;">
</video>
</body>
嗨,我之所以需要把JS是因爲DivX的插件正在取代HTML5視頻元素,如在此線程 http://stackoverflow.com/questions/4745626/prevent-divx-web-plugin-fron-replacement-html5-video-element – AngelaK 2013-02-24 00:23:07
mhhhhh ..這是因爲你的寬容程序員,divx人贏了.. !!!! 恥辱你!!!!!!! – cIph3r 2013-02-24 01:27:27