摘要: 首先讲解一下js中preventDefault和stopPropagation两个方法的区别: preventDefault方法的起什么作用呢?我们知道比如<a href="http://www.baidu.com">百度</a>,这是html中最基础的东西,起的作用就是点击百度链接到http://www.baidu.com,这是属于<a>标签的默认行为,而preventDefault方法就是可以阻止它的默认行为的发生而发生其他的事情。看一段代码大家就明白了: <!DOCTYPE html PUBLIC "-//W3C// 阅读全文
posted @ 2011-05-13 11:19 ╰☆Everytime I try to flying 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 1. userAgentiPhone userAgent:Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; zh-cn) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16ACCEPT:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5iPod touchuserAgent:Mozilla/5.0 阅读全文
posted @ 2011-05-13 09:49 ╰☆Everytime I try to flying 阅读(3216) 评论(0) 推荐(0) 编辑