Stay Hungry,Stay Foolish!

10 2014 档案

摘要:原生JS通过什么方法绑定click事件? 原生js有一下三种方法为DOM对象绑定click事件, 第一种,在html中添加 onclick属性,在此属性中添加要绑定的事件函数,如下, 这种方法为html处理事件的原始方法,使得html和js过分耦合, 即表现层代码 和 行为层代码耦合: ... 阅读全文
posted @ 2014-10-23 00:09 lightsong 阅读(8087) 评论(0) 推荐(0) 编辑
摘要:JQuery data 接口是什么?.data()Store arbitrary data associated with the matched elements or return the value at the named data store for the first element i... 阅读全文
posted @ 2014-10-12 22:18 lightsong 阅读(1318) 评论(0) 推荐(0) 编辑
摘要:JQuery + xml作为前后台数据交换 JQuery提供良好的异步加载接口AJAX,可以局部更新页面数据,http://api.jquery.com/category/ajax/ xml作为一种轻量数据格式,被浏览器js引擎普遍支持,同json格式,但是没有json那么精简。 使用AJAX... 阅读全文
posted @ 2014-10-10 22:12 lightsong 阅读(4088) 评论(0) 推荐(0) 编辑
摘要:JQuery链式法则 何为链式法则?先给出非链式写法的例子 再给出链式写法的例子 JQuery实现元素的定位与操作,如果每一次操作,必须先获取一次对象,则会出现页面多次定位相同的DOM,页面脚本定位DOM可能会非常频繁,导致操作耗费时间,页面响应比较慢。 JQuery如何实现链式法则? 下面以css 阅读全文
posted @ 2014-10-01 23:32 lightsong 阅读(1437) 评论(0) 推荐(0) 编辑

千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示