- -
以下两种方式正解!
1. 直接判断不用加引号
if ( id == undefined ) {}
2. typeof() 加引号
if( typeof(id) == "undefined" ) {}
- -
以下两种方式正解!
1. 直接判断不用加引号
if ( id == undefined ) {}
2. typeof() 加引号
if( typeof(id) == "undefined" ) {}
转载于:https://my.oschina.net/vshida/blog/88957