javascript getElementsByName

getElementsByName The document.getElementsByName(name) is a method of the document object that is used to get an element by its name. Syntax: document.getElementsByName(name) Example: <!DOCTYPE html> <html> <body> <script type=”text/javascript”> function fruitname() { var allfruits =document.getElementsByName(“fruit”); alert(“Total Fruits:”+allfruits.length); } </script> <form> BANANA:<input type=”radio” name=”fruit” value=”BANANA”> APPLE:<input type=”radio” name=”fruit” value=”APPLE”> MANGO:<input type=”radio” name=”fruit” value=”MANGO”> STRAWBERRY:<input type=”radio” name=”fruit” … Read more

javascript getElementById

getElementById The document.getElementById(id) is a method of the document object that is used to get an element by its element id. It is the easiest way to find an HTML element in the DOM. Syntax: document.getElementById(id) Example: <!DOCTYPE html> <html> <body> <h1 id=”DOM1″>”Get Element by ID!”</h1> <p id=”DOM2″></p> <script> var myElement = document.getElementById(“DOM1”); document.getElementById(“DOM2”).innerHTML = … Read more

javascript Document object

Document object The javascript document object is the window property that is used to represent a web page or an HTML document. It is a property of the window object and thus can be written as window.document or only document.  Methods of Document Object: METHOD USES document.getElementById(id) To get an element by its element id. … Read more

Javascript Navigator object

Navigator object Window is not an object of javascript; but all the JavaScript objects, functions, and variables are a property of the window object. There are various other objects of javascript that are considered as a property of the window. The javascript navigator object is the window property which is used for browser detection and … Read more

JavaScript Browser Objects

Browser Objects The Browser Object Model (BOM) is used for JavaScript to interact with the browser. All browsers nowadays use the same methods and properties for JavaScript interactivity, thus there is no official standard released for BOM to date. Window Object: The window is the default object of the browser and is supported by all … Read more

Redis vs MongoDB

Difference between Redis and Mongodb. Below is the comparative study between Redis and MongoDB.   REDIS MONGODB Developed by Salvatore Sanfilippo. Developed by MongoDB Inc. Written in C. Written in C++. Redis is an in-memory data structure store. MongoDB is a document oriented database server. Subscription based and open-source database. Free to use and open-source … Read more

CouchDB vs MongoDB

Difference between Couchdb and Mongodb. Below is the comparative study between CouchDB and MongoDB.   COUCHDB MONGODB Uses HTTP/REST based interface. Uses binary protocol and custom protocol. It is a NoSQL Database or a non-relational database. It is also a NoSQL Database or a non-relational database. CouchDB is a document oriented database server. MongoDB is … Read more