search

Home  >  Q&A  >  body text

js controls div style

var box;

window.onload=function () {

box=document.getElementById("box");

}

function aa () {

box.style.height="400px";

}

Is there any problem if the above code is replaced with the following code?

var box=document.getElementById("box");

function aa () {

box.style.height="400px";

}


GoshawkGoshawk2202 days ago836

reply all(0)I'll reply

No reply
  • Cancelreply