1234567891011121314151617181920212223242526 |
-
-
-
- var data = JSON.parse(localStorage.getItem("AZAR"));
-
- var page = document.getElementById("home");
-
- var aleatorio = Math.floor(Math.random()*32);
- document.getElementById("image").innerHTML = `<img src="img/${aleatorio}.jpg" width="100%" height="300">`;
- document.getElementById("Content").innerHTML = data[aleatorio].titulo + "<br>" + data[aleatorio].texto;
-
- page.addEventListener("show", function(event){
- document.getElementById("image").innerHTML='';
- document.getElementById("Content").innerHTML='';
- var aleatorio = Math.floor(Math.random()*32);
-
-
- document.getElementById("image").innerHTML = `<img src="img/${aleatorio}.jpg" width="100%" height="300">`;
-
- document.getElementById("Content").innerHTML = data[aleatorio].titulo + "<br>" + data[aleatorio].texto;
-
- });
-
-
-
|