Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function trocaSrc($a) {
- document.getElemtById("iframe1").src = $a.href;
- return false;
- }
- <div>
- <a href="https://www.youtube.com/embed/18WLEZZVaWY" onClick="return trocaSrc(this);">Video 1</a>
- <a href="https://www.youtube.com/embed/0CleeB4bY7U"; onClick="return trocaSrc(this);">Video 2</a>
- </div>
- document.getElemtById
- document.getElementById
Add Comment
Please, Sign In to add comment