Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <title>JavaScript YT BOT</title>
- <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
- <script>
- $(function(){
- function cargarVideo(){
- var videoId= "LBKtF6bB72Y?autoplay=1&mute=1"
- $(".actualyoutube iframe").remove();
- $('<iframe width="420" height="315" frameborder="0" allowfullscreen></iframe>')
- .attr("src", "http://www.youtube.com/embed/" + videoId)
- .appendTo(".actualyoutube")
- }
- $("#bntiniciar").click(function(){
- setInterval(cargarVideo,5000)
- });
- });
- </script>
- </head>
- <body>
- <input id="bntiniciar" type="button" value="Iniciar bot"/>
- <div class="actualyoutube">
- <iframe width="560" height="315" src="https://www.youtube.com/embed/LBKtF6bB72Y" frameborder="0" allowfullscreen></iframe>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement