zoukankan
html css js c++ java
js中的!!
var o={flag:true}; var test=!!o.flag;//等效于var test=o.flag||false; alert(test); 由于对null与undefined用!操作符时都会产生true的结果, 所以用两个感叹号的作用就在于, 如果明确设置了o中flag的值(非 null/undefined/0""/等值),自然test就会取跟o.flag一样的值; 如果没有设置,test就会默认为false,而不是 null或undefined。
查看全文
相关阅读:
2016/2/22 1、DOM的基本概念 2、Window对象操作 3、Windows.history对象 4、Window.location对象 5、Window.status对象
2016/2/21 JavaScript简介
2016/2/19 position: fixed absolute relative z-index float 半透明效果
2016/2/19 css样式表 Cascading Style Sheet 叠层样式表 美化HTML网页
2016/2/18 html 图片热点,网页划区,拼接,表单
2016/2/18 html 标签 表格
重载
面向对象 Java练习
Car 加油
大乐透 Java随机码
原文地址:https://www.cnblogs.com/XIE7654/p/6973393.html
最新文章
面向对象概述
Javascript中数组
默认行为
事件冒泡
事件对象
事件监听
POJ 1286 Necklace of Beads(Polya原理)
URAL 1018 Binary Apple Tree(树DP)
SPOJ 220 Relevant Phrases of Annihilation(后缀数组)
POJ 3294 Life Forms(后缀数组)
热门文章
POJ 3415 Common Substrings(后缀数组)
POJ 3693 Maximum repetition substring(后缀数组)
POJ 2406 Power Strings(KMP)
URAL 1297 Palindrome(Manacher)
SPOJ 694 Distinct Substrings/SPOJ 705 New Distinct Substrings(后缀数组)
POJ 3261 Milk Patterns(后缀数组)
UITableView去除空白cell上多余separator
2016/2/24 . html . htm . shtml 的区别
2016/2/22 三级导航
2016/2/22 1、Window.document对象
Copyright © 2011-2022 走看看