You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
580 B
JavaScript

5 years ago
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];
}