js判断变量有没有定义

方法:


if (typeof(reValue) == “undefined”) { 


   alert(“undefined”); 


}  


SyntaxHighlighter.highlight();