试试这个: typeof(variable) != "undefined" && variable !== null. 如果变量被定义,那么这将是真的,而不是null,这相当于PHP的isset的工作方式。
確定! 回上一頁