Answers for "js target video within iframe"

4

iframe getelementbyid

document.getElementById('myframe1').contentWindow.document.getElementById('x')
Posted by: Guest on June-12-2020
0

play iframe video onclick a link javascript

<iframe id="video1" width="450" height="280" src="http://www.youtube.com/embed/TJ2X4dFhAC0?enablejsapi" frameborder="0" allowtransparency="true" allowfullscreen></iframe>
    <a href="#" id="playvideo">Play button</a>
    <script>
     $("#playvideo").click(function(){
      $("#video1")[0].src += "?autoplay=1";
     });
    </script>
Posted by: Guest on May-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language