摘要:
第一个:获取事件 标准方式: 事件处理程序函数的第一个形参 e IE低版本方式:window.event 兼容处理: 这样在IE8就不会报错了 //因为IE8不支持 第二个:阻止事件冒泡 标准方式: stoppropagation(); IE低版本方式:cencelBubble=true; 兼容性处 阅读全文
posted @ 2018-08-13 17:07
suri&zh
阅读(131)
评论(0)
推荐(0)
~function(){
var person=prompt('type your family number of members');
if(person>=2){
alert('you have a lovely family')
}else if(person==1){
alert('you are single');
}else{
alert('you are martian')
}
}();