the following code:
document.querySelector(".div-bgd").style.display = "block";
document.querySelector(".load_div").style.display = "block";
console.log(1)
alert(1)
In the browser environment, why execute console
and alert
statements first instead of the first two statements that have changed styles?
examples are as follows: