Javascript can be written internaly (in the program) or externally. These two are discussed in detail in the following sections. Internal JavaScript Code JavaScript code is written inside the html page. The script code can be written in html page either in <head> , <body> or in both <head> and <body< section. The JavaScript code …
JavaScript
JavaScript History Object
The History object is read only property which includes browser’s history and information about the URL’s visited by the user. It provides methods and properties for manipulating browser session history. This object can be written without the window prefix. The History object doesn’t allow the non-privileged code in the history but allows navigating the session …
How To Test Cookie Support using JavaScript
A cookie is a small object allows servers to store users information on user machine. Cookies are stored in the partition assigned to the web servers domain. All cookies for that domain are sent in every request to that web server. When a user visits a page, his name can be stored in a cookie. …
How To Check Plug-In Support In Browser using JavaScript
A plug-in is a piece of software or module which acts as add-on or extension to a web browser and adds additional functionality to existing software application. There are programs which can be installed easily and used as part of the web browser. It allows web browser to display additional content and enables customization when …
JavaScript Array Object
Array is an group of element which is stored in a single object variable. If you have list of values of same type, then all the values can be stored in a array object with the index pointing to each value. All the elements in the array would be in the same type. The values …
JavaScript – Difference Between Two Dates
Let us see an example on how calculate difference between dates using Javascript. First write a HTML code with Javascript as below: The above program is used to calculate the days of difference between two dates . we have set two dates to two variables in the program var d1 = new Date(“12/12/2011”); and var …
JavaScript document.createElement()
Document.createElement() is used for creating element node. In HTML document, it creates specified HTML element .In other words it creates an instance of element for the specified tag. In document.createElement (), the element creates the element interface as soon it’s created. To create a text button, text node is created. The document.createElement( ) is supported by …
JavaScript Location Object
This object is used to get information about current URL of the browser and automatically navigates the user to another page. This object is part of the window object and can be accessed using the window.location property. There is no public standard that applies to the location object, but all major browsers support it. JavaScript Location …