<script> tag is used to insert a JavaScript into an HTML page.
<p> element with current date information to the HTML document by using (i) the method write of the object document and (ii) the date function/object, which gives the current time.
<script> tag.
Inside the <script> tag, use the type attribute to define the scripting language.
The <script type="text/javascript"></script> tells where the JavaScript starts & ends and are executed by the browser.
<p> element.
To manipulate HTML elements, the example uses
getElementById of the object document and
innerHTML, which defines both the HTML code and the text that occurs between that element’s opening and closing tag.
Each HTML element has an innerHTML property.
|
I asked God for a bike, but I know God doesn’t work that way. So I stole a bike and asked for forgiveness. |