将字符型转换成布尔型(string → boolean)
JSON.parse(“true”)
JSON.parse(“false”)
判断不为undefined
if (typeof(reValue) == undefined) {
alert(undefined);
}
typeof 返回的是字符串,有六种可能:number、string、boolean、object、function、undefined
将字符型转换成布尔型(string → boolean)
JSON.parse(“true”)
JSON.parse(“false”)
判断不为undefined
if (typeof(reValue) == undefined) {
alert(undefined);
}
typeof 返回的是字符串,有六种可能:number、string、boolean、object、function、undefined