<script> let a=xxx; if (!a && typeof a=="object") { alert(‘a是一个null‘); }else if(!a && typeof a=="undefined"){ alert(‘a是undefined‘) }else if(!a && typeof a==‘string‘){ alert(‘a是一个空字符串‘) }else{ alert(‘其它‘) } </script>
标签:判断 alert pos type == ack eof def nbsp
<script> let a=xxx; if (!a && typeof a=="object") { alert(‘a是一个null‘); }else if(!a && typeof a=="undefined"){ alert(‘a是undefined‘) }else if(!a && typeof a==‘string‘){ alert(‘a是一个空字符串‘) }else{ alert(‘其它‘) } </script>
标签:判断 alert pos type == ack eof def nbsp
原文地址:http://www.cnblogs.com/Ed-song/p/8051960.html