简体   繁体   中英

How can i embed my function in the button to operate on click?

<span>Generate Activation Request File</span>
                                <input type="submit" value="Generate"  class="submit" id="submit"/>

that is the button i need to integrate my function with, how can i do it so it does what the function generate_request_file() is supposed to achieve when clicked (onclick)

只需在输入标签中添加 onclick

<input type="submit" value="Generate" onclick="generate_request_file()" class="submit" id="submit"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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