javascript中,可以通过判断变量的值是否为“null”或者数据类型是否为“undefined”来检测变量是否存在,语法“if(typeof(a)=="undefined"||a==null){不存在}else