Why window.setInterval (step,1000); or just once?

< script >

var time;
window.onload=function(){
    var oHeart=document.querySelector(".heart");

    function step(){
        oHeart.style.transform="scale(0.7)";
    }
    stepstep();
 time= window.setInterval(step,1000);
    

}

< / script >

Mar.01,2021

var time;
window.onload=function(){
    var oHeart=document.querySelector(".heart");

    function step(){
        oHeart.style.transform="scale(0.7)";
    }
    stepstep();
 time= window.setInterval(step,1000);   

}

execute every second, but set a zoom ratio of 0.7 per second, which is invisible to the naked eye. You can type console

.

is not executed only once, but your style has not changed before and after. You can't see it. Try this

.
var time;
window.onload = function(){
    let oHeart = document.querySelector(".heart");

    function step(){
        oHeart.style.transform = "scale(1.0)";
        setTimeout(() => oHeart.style.transform="scale(0.7)", 500);
    }
    time = window.setInterval(step,1000);
    
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37df7-4d768.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37df7-4d768.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?