जावास्क्रिप्ट फंक्शन को फंक्शन के रूप में इनवोक करने के लिए, इसे एक सामान्य कस्टम जावास्क्रिप्ट फंक्शन की तरह कॉल करें।
उदाहरण
जावास्क्रिप्ट फंक्शन को फंक्शन के रूप में कॉल करने के लिए निम्नलिखित कोड चलाएं:
<html> <head> <script> function Display() { document.write ("Hello World!"); } </script> </head> <body> <p>Click the following button to call the function</p> <form> <input type = "button" onclick = "Display()" value = "Display"> </form> </body> </html>