js 强制转换
发布时间:2016-02-11 01:00:17
强制转换为布尔类型: 1 <script> 2 var text =Boolean(0) //=>以下转换的类型都为false 3 text = Boolean(0.0) 4 text = Boolean(-0) 5 text = Bo ...
强制转换为布尔类型:
1 <script> 2 var text =Boolean(0) //=>以下转换的类型都为false 3 text = Boolean(0.0) 4 text = Boolean(-0) 5 text = Boolean(0/0) 6 text = Boolean(NaN) 7 text = Boolean(undefined) 8 text = Boolean(null) 9 text = Boolean("")10 alert(text)11 </script>
原标题:js 强制转换
关键词:JS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。