Input and Output in JavaScript JavaScript models the HTML/XHTML document as the document object and the browser window which displays the HTML/XHTML document as the window object. The document object contains a method named write to output text and data on to the document as shown below: document.write(“Welcome to JavaScript”); To display multiple lines of text using the write method, include the HTML tag <br /> as a part of the string parameter as shown below: document.write(“Welcome<br />to<br />JavaScript”); The output of the above code on the document will be as shown below: Welcome to JavaScript Although the document object
The post How input and output methods work in javascript appeared first on Coding Security.
How input and output methods work in javascript
read more
Tidak ada komentar:
Posting Komentar