Home > Article > Web Front-end > JavaScript method to call multiple functions at the same time_javascript skills
The example in this article describes how JavaScript can call multiple functions at the same time. Share it with everyone for your reference, the details are as follows:
Here we analyze the implementation method of JavaScript calling multiple functions in the same web page at the same time. After clicking a button, multiple functions are executed, such as multiple windows popping up in succession.
The specific code is as follows:
<html> <head> <title>同时调用多个函数</title> <script language="javascript"> <!-- function fun1(){ alert("这是fun1"); } function fun2(){ alert("这是fun2"); } //--> </script> </head> <body> <input type="button" value="单击我" onClick="fun1(),fun2()"> </body> </html>
Run the program to pop up an alert window, and close it to pop up a second window.
I hope this article will be helpful to everyone in JavaScript programming.