var foo = 1; //variable exists if(! typeof foo == 'undefined') { alert("var 'foo' exists!"); } else { alert("var 'foo' doesn't exist!"); }
No comments:
Post a Comment