Jump to content

with (field)


newbman

Recommended Posts

Say you've got:document.getElementById('something').innerHTML = "....";document.getElementById('something').style.color="#FF0000";document.getElementById('something').style.backgroundColor="#000000";document.getElementById('something').title = "this";you could instead do:with( document.getElementById('something') ){ innerHTML = ".." style.color = "#FF0000"; style.backgroundColor = "#000000"; title = "this";}:)

Link to comment
Share on other sites

Blue is correct.On that page, it allows the coder to quickly write code without repeating the same phrase over and over again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...