|
|||||||
|
|||||||
|
|||||||
<script> Tag The HTML <script> tag is used to include either external script file or to define internal script for the HTML document. Following is an example where we are using JavaScript to define a simple JavaScript function − <!DOCTYPE html>
<html>
<head> <title>HTML script Tag Example</title> <base href = "http://www.tutorialspoint.com/" />
<script type = "text/JavaScript"> function Hello() { alert("Hello, World"); } </script> </head> <body> <input type = "button" onclick = "Hello();" name = "ok" value = "OK" /> </body> </html>
This will produce the following result, where you can try to click on the given button − Note − To learn about how JavaScript works, kindly check a separate tutorial available at https://www.tutorialspoint.com/javascript |
|||||||