Js/Bind()的认识
2024-08-29 01:47:29
1.bind( eventType [, eventData], handler(eventObject))
2.向绑定的对象上面提供一些事件方法的行为。其中三个参数的意义分别代表:
一.eventType是一个字符串类型的事件类型,就是你所需要绑定的事件。
这类类型可以包括如下:blur, focus, focusin, focusout, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error 。需要注意的是:这里用的都是javascript里面的事件方法,而不是JQuery里面的,JQuery里面的事件方法均在JavaScript 前面多了一个“on”,比如onclick,onblur。
二.绑定多个事件:
$(function () {
$("#BtnFirst").bind("click", function () {
alert("Hello World");
}).bind("mouseout", function () {
$("#TestDiv").show("slow");
});
})
最新文章
- Exif
- mybatis的#{}和${}的区别以及order by注入问题
- 【ArcGis for javascript从零开始】之一 ArcGis加载天地图
- Hadoop流程---从tpch到hive
- gulp初涉
- isinstance()和__name__
- handsontable常规配置的中文API
- 浅谈Servlet(三)
- github使用及代码同步
- 真机调试方法- IOS/Android移动设备
- 6.while loop
- 网络流之最小费用最大流 P1251 餐巾计划问题
- 分布式事务?咱先弄明白本地事务再说 - ACID
- vue学习笔记 - 篇2
- Kattis之旅——Fractional Lotion
- for循环循环时间
- 定制controller转场动画
- JNI-获取Java对象的成员变量-GeInttField()
- Win10如何显示系统托盘所有图标
- 033——VUE中安装使用vue-devtools调试工具用于监控数据变化
热门文章
- How use Nmon and ";Java Nmon Analyzer"; for Monitor Linux Performance
- 剑指offer(19)顺时针打印矩阵
- overture不同行的音符应该如何连线?
- wepy开发小程序eslint报错error 'getApp' is not defined no-undef
- Linux 命令行下导入导出 .sql 文件
- Unity3d外包-就找北京动点软件
- 在pycharm中运行python程序
- PAT 1065 A+B and C (64bit)
- Gitlab CR
- RobotFramework--环境安装1