This commit is contained in:
Alessandro Ferro 2024-03-22 10:55:15 +01:00
parent a94703acf8
commit a7afce27e3
3 changed files with 9 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -111,17 +111,19 @@
//callbackErrors(data.errors, alert); //callbackErrors(data.errors, alert);
} }
} }
function loadImage(){ function loadImage() {
const random = Math.floor(Math.random() * 2); const random = Math.floor(Math.random() * 4);
if(random == 0){ if (random == 0) {
document.getElementById('image').src = '../content/stock_photo_1.png'; document.getElementById('image').src = '../content/stock_photo_1.png';
} } else if (random == 1) {
else if(random == 1){
document.getElementById('image').src = '../content/stock_photo_2.png'; document.getElementById('image').src = '../content/stock_photo_2.png';
} else if (random == 2) {
document.getElementById('image').src = '../content/stock_photo_3.png';
} else if (random == 3) {
document.getElementById('image').src = '../content/stock_photo_4.png';
} }
} }
</script> </script>
</body> </body>