Java.lab4
Java.lab4
JavaScript can write directly into the HTML output stream:
You can only use document.write strong> in the HTML output. If you use it after the document has loaded (e.g. in a function), the whole document will be overwritten.
JavaScript can write directly into the HTML output stream: This is a heading This is @ paragraph You can only use document.write in the HTML output. If you use it after the document has loaded (e.g. in a function), the whole document will be overwritten. External JavaScripts Scripts can also be placed in external files. Extemal files often contain code to be usedFACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY Hamdard University by several different web pages.External JavaScript files have the file extension .js.To use an external script, point to the js file in the "src" attribute of the My First Web Page My First Paragraph. After click Oops! The document disappeared! JavaScript Code JavaScript code (or just JavaScript) is a sequence of JavaScript statements. * Each statement is executed by the browser in the sequence they are written © This example will manipulate two HTML elements:ff (\\ a) we FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY Hamdard University