Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to call multiple JavaScript functions in onclick event?
To call multiple JavaScript functions in on click event, use a semicolon as shown below −
onclick="Display1();Display2()"
Example
<html>
<head>
<script>
function Display1() {
document.write ("Hello there!");
}
function Display2() {
document.write ("Hello World!");
}
</script>
</head>
<body>
<p>Click the following button to call the function</p>
<form>
<input type = "button" onclick = "Display1(); Display2()" value = "Result">
</form>
</body>
</html> Advertisements
