js学习笔记
1.?? ==?? 等于???? ===全等(值和类型都相等)
?????? 如: x=5?????? x==5 true???????? x===5 true?? x==="5" false
?
2.?? 基于某些条件对变量进行赋值的条件运算符
?
variablename=(condition)?value1:value2例子:greeting=(visitor=="PRES")?"Dear President ":"Dear ";
3.? 通过js在页面中显示时间
?
?4. 提示框的使用
?
?
5. 数组的用法
???????? 使用 concat() 方法来合并两个数组:
document.write(Math.floor(Math.random()*11))??
?