Changes

Jump to navigation Jump to search
627 bytes added ,  18:28, 22 May 2023
Created page with "<!DOCTYPE html> <html> <head> <title>YouTube Video Auto Play</title> </head> <body> <div id="video-container"></div> <script> function loadVideo() {..."
<!DOCTYPE html>
<html>
<head>
<title>YouTube Video Auto Play</title>
</head>
<body>
<div id="video-container"></div>

<script>
function loadVideo() {
var container = document.getElementById('video-container');
var videoUrl = 'https://www.youtube.com/embed/efR1C6CvhmE?autoplay=1';

var iframe = document.createElement('iframe');
iframe.src = videoUrl;
iframe.width = 400;
iframe.height = 240;
iframe.setAttribute('allow', 'autoplay');
container.appendChild(iframe);
}

window.onload = loadVideo;
</script>
</body>
</html>
581

edits

Navigation menu