$('#remember').is(':checked')
typeof的运算数未定义,返回的就是 "undefined". 运算数为数字 typeof(x) = "number" 字符串 typeof(x) = "string" 布尔值 typeof(x) = "boolean" 对象,数组 和null typeof(x) = "object" 函数 typeof(x) = "function"
var exp = null; if (typeof(exp) == "null") { alert("is null"); } 为了向下兼容,exp 为 null 时,typeof 总返回 object。