What is the difference between Client side JavaScript and Server side JavaScript.
Correct Answer
Client side java script comprises the basic language and predefined objects which are relevant to running java script in a browser The client side java script is embedded directly by in the HTML pages This script is interpreted by the browser at run time Server side java script also resembles like client side java script It has relevant java script which is to run in a server The server side java scripts are deployed only after compilation
Correct Answer: JavaScript: - JavaScript is a scripting language developed by Netscape Communications - The Netscape Navigator interprets JavaScript embedded into Web pages - JavaScript is used for developing web applications - It is not dependent on Sun Microsystem's Java language JScript: - Microsoft JScript is an open implementation of Netscape's JavaScript - JScript is a scripting language designed to create active online content ActiveX controls, Java programs, etc can be linked and automated in the web pages using JScript
2. What are the advantages of the external over inline style methods?
Correct Answer: - External Style Sheets are useful as it keeps the style and content separately and doesn?t allow it to mix with each other It can control the styles for multiple documents, whereas inline style mixes the content with the style and make the code messier - External style sheet allows the creation of various classes in a structured way, whereas inline style sheet can?t create or control class elements - External style sheet can use selector and grouping methods to apply styles, whereas inline styles can?t use selector and grouping methods
Correct Answer: Media types in CSS define the media like audio and video to be used in your HTML document to represent the properties in a better way The font property can be used for media types as it can be used for print media or screen media Document requires a defined media to represent the screen that can be read on the paper It is used as:@media ----------Your code here----------
Correct Answer: Pseudo elements allow the use of the part of element and not the element itself They are applied to block level element, which is used for the complete block for which the CSS is being written This allow the subpart of an element to be styled like paragraphs and headings For example: selector:pseudo-element {property:value;} p: first-line {text-transform: lowercase;} It adds the style to the first line of the code in the paragraph
5. What is the difference between class selector and ID selector?
Correct Answer: - Class selector can be given to an overall block This is sometimes termed as block element as well, whereas ID selector identifies a unique name and a style for a specific element - ID selector declares the style for only one particular element which can be differentiated from other element, whereas Class selector is being given for the whole complete block
6. Where are cookies actually stored on the hard disk?
Correct Answer: The storage of cookies on the hard disk depends on OS and the browser The Netscape navigator on Windows, the file cookiestxt contains all the cookies The path is : c:\Program Files\Netscape\Users\username\cookiestxt The Internet Explorer stores the cookies on a file by name username@websitetxt is c:\Windows\Cookies\username@Websitetxt
Correct Answer: The elements of JavaScript are accessed by their names By default the browser is accessed by the element ?windows? and the page by ?document? The corresponding element has user defined names for forms and its elements For example var pwd = windowsdocumentfrmLoginpasswordvalue; assigns the value of the password field of the form fromLogin in the current document, where password is the name of the element and frmLogin is the name of the form Like wise any form element is accessed
Correct Answer: The cursor can set to wait in JavaScript by using the property ?cursor? property The following example illustrates the usage windowdocumentbodystylecursor = "wait";
9. What is decodeURI(), encodeURI() in JavaScript?
Correct Answer: To send the characters that can not be specified in a URL should be converted into their equivalent hex encoding To perform this task the methods encodeURI() and decodeURI() are used For example, the following code snippet performs the encoding of URL:
10. What are windows object and navigator object in JavaScript?
Correct Answer: Windows object is top level object in Java script It contains several other objects such as, document, history, location, name, menu bar etc, in itself Window object is the global object for Java script that is written at client-side Information pertaining to the client browser and system is returned by the navigator object of JavaScript Navigator object is the top level object for all users