简体   繁体   English

具有多种功能的Onclick属性

[英]Onclick attribute with multiple function

Is there any way i can call three function which takes input as a parameter and return nothing? 我有什么方法可以调用将输入作为参数而什么都不返回的三个函数? I don't want to use click event of jquery i am looking to pass three function in attribute level. 我不想使用jclick的click事件,我希望在属性级别传递三个函数。

Thanks 谢谢

If you want a more specific answer, please ask a more specific question. 如果您需要更具体的答案,请提出更具体的问题。 The following answer is valid for 以下答案适用于

Is there any way i can call three function which takes input as a parameter and return nothing? 我有什么方法可以调用将输入作为参数而什么都不返回的三个函数? I don't want to use click event of jquery i am looking to pass three function in attribute level. 我不想使用jclick的click事件,我希望在属性级别传递三个函数。

<button onclick="first(1);second(2);third(3);">go</button>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM