There are many other times, apart from the loading of the page, at which we mightwant to perform a task. Just as JavaScript allows us to intercept the page load eventwith <body onload="">or window.onload, it provides similar hooks for user-initiatedevents
such as mouse clicks (onclick), form fields being modified (onchange), andwindows changing size (onresize). When assigned directly to elements in the DOM,these hooks have similar drawbacks to the ones we outlined for onload. Therefore,jQuery offers an improved
way of handling these events as well.
有很多时候,我们想绑定一些事件,而不仅仅是在加载网页的时候触发。正如js允许我们使用<body onload=''>和window.onload监听网页加载事件,他也提供了相似的拦截器用来对用户事件作出反应,比如鼠标的点击事件(onclick),表单元素被修改(onchange)和窗口大小被修改(onresize)。当我们直接绑定到DOM中的元素上的时候,这些拦截器和之前我们描述过的onload有着相似的缺点。因此,jquery对这些方法也提供了高级的处理方法。
分享到:
相关推荐
简单交通车辆创建插件——SimpleTraffic 压缩包内容为:简单交通车辆创建插件-SimpleTraffic.unitypackage 导入后有PDF说明文档
PHP实例开发源码——php SMF论坛Simple Machines Forum
python项目实战
PHP实例开发源码——SMF论坛(Simple Machines Forum) PHP版繁体中文版
IOS应用源码——SimpleGame.rar
IOS应用源码——Simple Table.rar
iOS游戏应用源代码——monoclestudios-simplegame.zip
PHP实例开发源码——SMF论坛Simple Machines Forum.zip
iOS实例开发源码——monoclestudios-simplegame-53967a3.zip
IOS应用源码——shenxiangyu-SimpleGame-5473bb8.rar
我是css初学 大家别下 我存着的~~
PHP文件数据类网站实例开发源码——Simple Directory Listing 文件管理系统.zip
iOS游戏应用源代码——shenxiangyu-SimpleGame-5473bb8.zip
IOS应用源码——Tumunu-Simple-Number-Guessing-Game-9460b6d.rar
simplecalendar.js记录事件的日历插件
iOS游戏应用源代码——Tumunu-Simple-Number-Guessing-Game-9460b6d.zip
PHP文件数据类网站实例开发源码——Simple Directory Listing 文件管理系统.rar
.net探秘——MSIL权威指南 simple.il
应网友私信需要,上传基于高德开放平台爬取的重庆地区公交站点与路线数据。数据包含站点、路线的.csv数据,以及相应的.shp数据。