This may be the first question that you are asked when you appear for the interview. It is a scripting language which can be used from the client side or the server side and can be inserted into pages of HTML. This is also understood by the web browser. It is a programming language which is object oriented.
What is the use of isNaN function?
It is returned true if the argument that is put forward is not a number otherwise it is false.
- It is helpful in setting browser preference and is helpful in receiving a request for the server that is used by the client.
- The settings used to get saved on the client side in features like action buttons, printing, and appearance.
- It helps in easily launching an application on the computer of the client by usage of interactive data that is to be communicated between the server and the client.
- It is helpful in a reading of files that are situated on the client side or the server side.
- It helps in easily capturing data that is live-streamed between the server and the machine of the client for retransmission.
- It allows safety and security to the applications from the outside world.
Explain the usage of DOM?
Document Object Model is the full form of DOM. It is used for the creation of a model using documents of pages of the web which contains objects like the elements, the link and the like. Manipulation can be done to the objects and certain nature of action can be added, deleted or changed using DOM. It is responsive to API calls which results in a recommendation of DOM in the documented level. Additional behavior can be supported on the web page by usage of DOM. The usage of API gives it an upper hand than other models that exist. Codes used by DOM can be reused for meeting the requirement of the real world so as to make the entire program interoperable.
Explain the importance of <SCRIPT> tag?
- Validation of data entry: If this field is filled out then it indicates that during dealing out with the server the side of the client can have interaction with these.
- Dynamic HTML interactivity: Without the use of any other language for scripting this allows the dynamic placement of data.
- Prototyping of CGI: User interface could be accessed using less time using this before the implementation of GCI application.
- Window object: In the hierarchy, this is the topmost object. It is the representation of the area of the content of the browser which has the HTML documents. Every frame is a window and has some nature of action inside it.
- Document object: It is formed by many objects which are of a different nature and it gets loaded into a window. It is the content that is written within the script.
- Form object: This nature of the object helps the interaction with the user. It is used to represent the form of element inside <FORM> … </FORM>.
- This is used for the creation of script references to the objects while names are assigned to various objects which are scriptable in the code of HTML. The browsers which are compatible with the script try to find the optional tags and the attributes which enables assigning names which are unique to every object.
- Identification and location of the elements are done easily by usage of the names which acts as nametags. The references that are made for the objects are from top to the bottom of the hierarchy.
The importance of object naming is that it provides an easy way of locating the objects and the linkage between them can be done in an easy manner.
A method is instructive that gets performed over an activity that is identified with the object. Method either acts on certain objects or influence any piece of the script or a report. An object is permitted to have any number of methods but they must be associated with the other object.
Dynamic interactions amongst users are performed using this function. The statement that is first is executed to send a form to the server when the button of submitting is pressed. The two statements have relation only with the form.
Explain what you know about document loading?
Explain the function of Deferred Scripts?
These are scripts the statement of which runs as such that the statement appears to be grouped together as a function. It defines a block which statement of script consists of and helps to run those that are in <SCRIPT> tags which happen after all the various statements are loaded on to the browser. The visibility inside the <SCRIPT> tag can be easily seen by this functionality. Every function over here starts with (), the name of the function is written afterward which also includes the parentheses. After the loading of the function, it is ready to be run when there is a necessity. It is very useful when a function needs to run just after being loaded. Usage of event handlers are made by Window objects which trigger the nature of the response to the action of the user and then the handler is onLoad.