jQuery event.data 属性
jQuery 教程
· 2019-03-10 22:13:32
实例
对每个 <p> 元素返回通过 on() 方法传递的数据:
$("p").each(function(i){
$(this).on("click",{x:i},function(event){
alert("序号:" + $(this).index() + ". 段落的数据为: " + event.data.x);
});
});
$(this).on("click",{x:i},function(event){
alert("序号:" + $(this).index() + ". 段落的数据为: " + event.data.x);
});
});
定义和用法
event.data 属性包含当前执行的处理程序被绑定时传递到事件方法的可选数据。
语法
event.data
| 参数 | 描述 |
|---|---|
| event | 必需。event 参数来自事件绑定函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Java Concurrency in Practice
Brian Goetz、Tim Peierls、Joshua Bloch、Joseph Bowbeer、David Holmes、Doug Lea / Addison-Wesley Professional / 2006-5-19 / USD 59.99
This book covers: Basic concepts of concurrency and thread safety Techniques for building and composing thread-safe classes Using the concurrency building blocks in java.util.concurrent Pe......一起来看看 《Java Concurrency in Practice》 这本书的介绍吧!