alert('value:'+str+' type:'+typeof(str)) //声明变量前,引用 var str="dd"; alert('value:'+str+' type:'+typeof(str)) //声明并赋值变量后,引用 str=undefined; //删除局部变量 alert('value:'+str+' type:'+typeof(str)) //取消变量后,引用,和第一个相同