JavaScript Inclusion in HTML File
Javascript in Internal File You can place JavaScript code on HTML pages anywhere within<html> tags(within <body>tag as well as <head> tag) JavaScript code must be inside <script> tag for aninternal placement. Within <head> tag
1 2 3 4 5 | <head> <script language="JavaScript" type="text/javascript"> //JavaScript code </script> </head> |
Within <body> tag
1 2 3 4 5 | <body> <script language="JavaScript" type="text/javascript"> //JavaScript code </script> </body> |
External JavaScript To use JavaScript from an external file source, all JavaScript source code must be written … Read more