Home > Web Front-end > JS Tutorial > jQuery on method passing parameter example_jquery

jQuery on method passing parameter example_jquery

WBOY
Release: 2016-05-16 16:28:01
Original
1536 people have browsed it

Teach you how to pass parameters to the function bound to the jQuery on method. The code is as follows:

Copy code The code is as follows:

$(".loadingFlower").on("click",'',{name:"123",id:"234",tel:"345"},callback)

function callback(event){
console.log(event.data.name); //Parameter 1 =>123
console.log(event.data.id); //Parameter 2 =>234
console.log(event.data.tel); //Parameter 3 =>345
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template