
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10483 Articles for Web Development

339 Views
The HTML DOM input Password autofocus property is associated with the HTML element’s autofocus attribute. This property is used for setting or returning if the input password field should be automatically focused when the page loads or not.SyntaxFollowing is the syntax to −Set the autofocus property −passwordObject.autofocus = true|falseHere, true represents that the password field should get focus and false represents otherwise. It is set to false by default.ExampleLet us look at an example for the Input Password autofocus property − Input password autofocus property Password: CHECK FOCUS function FocusVal() { ... Read More

389 Views
The HTML DOM Input number value property is associated with the input element having type=”Number” and having the value attribute. This property is used for returning the value of input element value attribute or to set it. This property is used for specifying a default value for elements and it also changes its value to user input.SyntaxFollowing is the syntax for −Setting the value property −numberObject.value = number;Here, number is used for specifying the value for the number field.ExampleLet us look at an example for the input Number value property −Live Demo Input Number Value property PHONE NO: ... Read More

238 Views
The HTML DOM Input number type property is associated with the input element having its type=”number”. It will always return number for the input number element.SyntaxFollowing is the syntax for number type property −numberObject.typeExampleLet us look at an example for the HTML DOM Input Number type property −Live Demo Input Number type property PHONE NO: Get the above element type by clicking the below button Get Type function getType() { var t = document.getElementById("NUMBER1").type; document.getElementById("Sample").innerHTML = "The type for the input field is : "+t; } ... Read More

519 Views
The HTML DOM Heading object is associated with the HTML heading elements ranging from to . Using the heading object we can create and access heading element with the createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a Heading object −var p = document.createElement("H1");ExampleLet us look at an example for the Heading object −Live Demo Heading object example Create a h1 element by clicking the below button CREATE function createH1() { var h = document.createElement("H1"); var txt = document.createTextNode("H1 element has been created"); h.appendChild(txt); ... Read More

791 Views
In this article, we are going to learn how to insert a node as a chils before an existing chilin JavaScript with appropriate examples. The Javascript has provided insertBefore() method to insert a node as a child before another child. If there are 2 lists we can shuffle the elements between them based on our requirement using the method insertBefore(). Let’s understand this concept better with the help of examples further in this article. Syntax The syntax to insert a node as a child before an existing child in JavaScript for insertBefore method is − insertBefore(newNode, refNode); Where, ... Read More

2K+ Views
The HTML DOM header object is associated with the HTML element that introduced in HTML 5. Using the header object we can create and access element using the createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a header object −var p = document.createElement("HEADER");ExampleLet us look at an example for the HTML DOM header object −Live Demo Header object example Create a header element by clicking the below button CREATE function headerCreate() { var h = document.createElement("HEADER"); document.body.appendChild(h); var h2 = document.createElement("H2"); ... Read More

160 Views
The HTML DOM HashChangeEvent is a type of interface used for representing those events that fire whenever the # part of the URL has been modified.PropertiesFollowing are the properties for the HashChangeEvent −PropertyDescriptionnewURLTo return the document URL after the hash has been modified.oldURLTo returns the document URL before the hash was changedSyntaxFollowing is the syntax for HashChangeEvent.event.eventPropertyHere, eventProperty is one of the above two properties.ExampleLet us look at an example for the HashChangeEvent.Live Demo HashChangeEvent example Change the hash by clicking the below button CHANGE function changeHash() { location.hash = "NEWHASH"; ... Read More

194 Views
The HTML DOM getNamedItem() method is used for getting the attribute node with a given name as a NamedNodeMap object. To get that specific attribute node we have to call this method only upon the attributes property since the attribute property returns a list from which we can filter a specific attribute using getNamedItem() method.SyntaxFollowing is the syntax for the getNamedItem() method −namednodemap.getNamedItem(nodename)Here, nodename is a mandatory parameter value of type string indicating the name of the node present in the namedNodeMap.ExampleLet us look at an example for the getNamedItem() method −Live Demo getNamedItem() example USERNAME: ... Read More

2K+ Views
The given task to perform in this article is to insert a specified element in a specified position in JavaScript. The Javascript has provided "insertAdjacentElement()" to insert an already existing element in a specified position. There are four specified legal positions. The first position is ‘afterbegin’ (After the beginning of the element (first child)), the second is ‘afterend’ (After the element), third is ‘beforebegin’ (Before the element) and the fourth legal position is ‘beforeend’ (Before the end of the element (last child)). If there are multiple elements with the same name, then use indexes to access them as we access ... Read More

191 Views
The HTML DOM Geolocation coordinates property is used for getting a user’s device position and altitude on earth. The user have to approve that he/she wants to give coordinates before this property could work. This is done so that users privacy isn’t compromised. This can be used for tracking various devices location.PropertiesFollowing is the position property −Note − The below properties are read-only −PropertyDescriptionposition.coordsTo return a coordinates object having information like latitude, longitude, altitude, and speed of the device on the earth. It also has an accuracy value describing how accurate the measurements are in meters.position.timestampTo representing the time and ... Read More