You are viewing a single comment's thread from:

RE: HTML The class Attribute

in #class7 years ago

Good post @rabiul - in the interest of not writing more code than absolutely necessary, I reckon you could’ve achieved the same outcome with your function by writing the following:

function myFunction {
  document.getElementByClassName(‘city’).style.display = “none”;
}

Keep up the good posts.