We know that JavaScript is client side scripting language. Now question arise that how to write JavaScript code and what is the syntex for the javascript.
JavaScript is implemented by JavaScript statements which are placed within the <script> </script> HTML tags.
We can put JavaScript anywhere in the webpage but it is recomended that we should keep it within HTML <head> tags.
<script> tag alerts the browser that the text between script tags is JavaScript code.
JavaScript Syntax:
-----------------------------------------------------------------------
<script language="javascript" type="text/javascript">
JavaScript code Appere Here
</script>
-----------------------------------------------------------------------
As stated above, script tag is consist of 2 important attributs.
- Language
Although recent HTML versions have phased out this attribute.
- Type
Comments
Post a Comment