Jump to content

newbie question


Guest alek_mil

Recommended Posts

Guest alek_mil

Hi,I've come across the following code.

function html_disableItem(nd,a){var lEl = document.getElementById(nd);if (lEl && lEl != false){   if(a){       lEl.disabled = false;       lEl.style.background = '#ffffff';    }else{       lEl.disabled = true;       lEl.style.background = '#cccccc';}}return true;}

It should disable a form on a page. In general it's quite understandable to me but I just can't figure out what's that if (lEl && lEl != false) is and how it works. :)

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...