Possible Duplicate: Detecting an undefined object property in JavaScript javascript undefined compare
H
You can use two way 1) if ( val == null ) 2) if ( val === undefine )
if ( val == null )
if ( val === undefine )