Saturday, March 18, 2023
HomeCSSjavascript - Modification Picture on websites relying on time as well as...

javascript – Modification Picture on websites relying on time as well as day

I’m dealing with a page as well as I call for some assist with the javascript. The website must have the ability to pack a fullscreen photo that alters relying on the moment as well as day. To be specific there are weekday programs as well as weekend break programs as well as this web page is needed to predict the programs poster relying on what time it is as well as what day. My present code appears like this;


<< html>>.
<< head>>.
<< meta charset=" UTF-8">
<> < web link rel=" stylesheet" kind=" text/css" href=" styles.css"/>>.
<< title>> PICTURE LOOPHOLE!<.

<< body>>.
<< manuscript kind=" text/javascript" src=" app.js" ><> .
<< img id=' Kiss100' src=" images/4. png">
<> .


 body {
background-image: linear-gradient( white, dimgray);

img {
border-radius: 4px;
extra padding: 5px;
size: 2560px;
elevation: 720px;
object-fit: fill;


 setInterval( feature() {

var day = brand-new Day();

var img = document.getElementById(' Kiss100');

if (date.getHours() < < 12) {
if( img.src.indexOf(' Kiss') < < 0) {
} else {
if( img.src.indexOf(' Kiss100') < < 0) {
img.src=" images/1. jpeg"


Do not hesitate to offer responses with any luck asap.
Many thanks ahead of time.

As you can see I attempted establishing a particular resolution in css yet I desire it to alter relying on the system likewise the javascript I desired it to be extra details yet I obtained stuck please assistance ...


Most Popular

Recent Comments