Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Function Example JavaScript</title>
- <script>
- function displayMessage() { //user-defined function
- alert("This is an alert box sample"); //built-in function
- }
- </script>
- </head>
- <body>
- <p>Function Example</p>
- <form>
- <input type="button" value="Click me" onClick="displayMessage()" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement