js判断 '',"",null,undefined
<script type="text/javascript">
//判断js '',"",null,undefined
function test(a)
{
if(a){
alert("");
}else{
alert("else");
}
}
test(); //输出: else
test('');//输出:ielse
test("");//输出:else
test(null);//输出:else
</SCRIPT>
<script type="text/javascript">
//判断js '',"",null,undefined
function test(a)
{
if(a){
alert("");
}else{
alert("else");
}
}
test(); //输出: else
test('');//输出:ielse
test("");//输出:else
test(null);//输出:else
</SCRIPT>
暂无评论。
评论功能维护中,当前仅展示历史评论。