Guest User

Untitled

a guest
May 16th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function trocaSrc($a) {
  2. document.getElemtById("iframe1").src = $a.href;
  3. return false;
  4. }
  5.  
  6. <div>
  7. <a href="https://www.youtube.com/embed/18WLEZZVaWY" onClick="return trocaSrc(this);">Video 1</a>
  8. <a href="https://www.youtube.com/embed/0CleeB4bY7U"; onClick="return trocaSrc(this);">Video 2</a>
  9. </div>
  10.  
  11. document.getElemtById
  12.  
  13. document.getElementById
Add Comment
Please, Sign In to add comment