

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use an HTML button to call a JavaScript function?
The simplest way to use an HTML button to call a JavaScript function is shown below −
<input id = "Double Click here" type = "button" value = "clickme" ondblclick = "myFunction();" />
You can also use the following by adding to the DOM property −
document.getElementById("Double Click here ").ondblclick = myFunction;
- Related Questions & Answers
- How to call a JavaScript function in HTML?
- How to use setInterval function call in JavaScript?
- How to call a JavaScript function from an onClick event?
- How to call a JavaScript function from an onsubmit event?
- How to call a JavaScript function from an onmouseover event?
- How to call a JavaScript function from an onmouseout event?
- How to call a function in JavaScript?
- How to call JavaScript function in an alert box?
- How to call a Java function inside JavaScript Function?
- How to delay a JavaScript function call using JavaScript?
- How to call a JavaScript function on click?
- How to call a JavaScript function from C++?
- How to call jQuery function with JavaScript function?
- How to call a parent window function from an iframe using JavaScript?
- How to call a JavaScript function on submit form?
Advertisements