function randomInt(){ return Math.ceil(Math.random() * 35); } function setPage() { var num1 = randomInt(); var num2 = randomInt(); document.body.background = "./img/" + num1.toString() + ".jpg"; document.body.style.backgroundRepeat = "repeat"; document.getElementById("img1").src = "./img/" + num2.toString() + ".jpg"; } let videoSrc = ['https://www.youtube.com/embed/7e9Q7HnvaM8','https://www.youtube.com/embed/sNQp1rJE26s']; function setvideo() { var num = Math.floor(Math.random() * 2); document.getElementById("vid").src = videoSrc[num]; }