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.

33 lines
1.2 KiB
JavaScript

5 years ago
var tech = ["./img/2.jpg","./img/3.jpg","./img/4.jpg","./img/5.jpg","./img/6.jpg","./img/7.jpg","./img/8.jpg","./img/9.jpg","./img/10.jpg","./img/11.jpg","./img/12.jpg","./img/13.jpg","./img/35.jpg"];
var memo = ["./img/1.jpg","./img/15.jpg","./img/16.jpg","./img/17.jpg","./img/18.jpg","./img/19.JPG","./img/20.jpg","./img/21.jpg","./img/22.jpg","./img/24.jpg","./img/25.jpg","./img/26.jpg", "./img/31.jpg"];
5 years ago
function randomInt(){
5 years ago
return Math.ceil(Math.random() * 13);
5 years ago
}
5 years ago
function setPageM() {
5 years ago
var num1 = randomInt();
var num2 = randomInt();
5 years ago
document.body.background = memo[randomInt()];
5 years ago
document.body.style.backgroundRepeat = "repeat";
5 years ago
document.getElementById("img1").src = memo[randomInt()];
5 years ago
}
5 years ago
function setPageT() {
var num1 = randomInt();
var num2 = randomInt();
document.body.background = tech[randomInt()];
document.body.style.backgroundRepeat = "repeat";
document.getElementById("img1").src = tech[randomInt()];
}
5 years ago
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];
}