Explain the process of document loading in JavaScript?
Submitted by: AdministratorWhen a document loads that means it is getting ready for the execution on the system. The document loads in the browser when there is a running of a document on the system. The applicaiton allows the JavaScript to look for all the properties that is given to the object and include all the property values that are used in the content that is being rendered for the page about to load. It is always a good practice to include the content in <SCRIPT> tags and statements in the Body portion of the document. This way the application gets loaded immediately.
<HTML>
<HEAD>
<TITLE>Immediate loading</TITLE>
</HEAD>
<BODY>
<H1>JavaScript used</H1>
<HR>
<SCRIPT LANGUAGE="Text/JavaScript">
<!-- Comments are used to hide from old browsers
document.write("Give the version " + navigator.appVersion)
document.write(" of <B>" + navigator.appName + "</B>.")
// end of the comment section -->
</SCRIPT>
</BODY>
</HTML>
Submitted by:
<HTML>
<HEAD>
<TITLE>Immediate loading</TITLE>
</HEAD>
<BODY>
<H1>JavaScript used</H1>
<HR>
<SCRIPT LANGUAGE="Text/JavaScript">
<!-- Comments are used to hide from old browsers
document.write("Give the version " + navigator.appVersion)
document.write(" of <B>" + navigator.appName + "</B>.")
// end of the comment section -->
</SCRIPT>
</BODY>
</HTML>
Submitted by:
Read Online Expert Developer JavaScript Job Interview Questions And Answers
Top Expert Developer JavaScript Questions
☺ | Mention what is the disadvantage of using innerHTML in JavaScript? |
☺ | Which keyword is used to print the text in the screen? |
☺ | Why it is not advised to use innerHTML in JavaScript? |
☺ | Explain the concept of unobtrusive JavaScript? |
☺ | How are JavaScript and ECMA Script related? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | SWFObject Interview Questions. |