0
我在我的網站上通過動態創建的iframe加載了vimeo視頻。對於移動設備,我需要到src從改變:在iframe中添加src
<iframe src="https://player.vimeo.com/video/220535146?controls=0&hd=1&autoplay=1&player_id=banneroneVid&api=1" width="640" height="360" frameborder="0" title="reebok_short_loop" webkitallowfullscreen mozallowfullscreen allowfullscreen frameborder="0" id="banneroneVid" ></iframe>
到
<iframe src="https://player.vimeo.com/video/220535146?background=1" width="640" height="360" frameborder="0" title="reebok_short_loop" webkitallowfullscreen mozallowfullscreen allowfullscreen frameborder="0" id="banneroneVid" ></iframe>
我非常希望這樣的事情發生在頁面加載。
謝謝
那是一個好主意,但在這種情況下,URL被作爲當地負載產生的,所以我想我需要離開讀取URL然後通過php或jquery進行更改 – user3638272