What is DOM and DOM Selector in jQuery? Please help... [Resolved]

Posted by Kumarkrishna184 under jQuery on 12/1/2015 | Points: 10 | Views : 1430 | Status : [Member] | Replies : 2
What is DOM and DOM selector in jquery? Please clear about this. Thanks and regards, Krishna

Thanks and Regards,
Krishna Kumar


Posted by: Rajnilari2015 on: 12/1/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50


What is DOM ?

The HTML DOM is a standard object model and programming interface for HTML. It defines:

- The HTML elements as objects
- The properties of all HTML elements
- The events for all HTML elements
- The methods to access all HTML elements



<title>Simple HTML</title>
<script type="javascript">

function LoadMeFirst(){
alert("Html Dom loading.....");
function ClickME(){
alert("Dom Loaded and hence the button is clicked");
var accessingTheParagraphText = document.getElementsByTagName('p')[0].innerHTML;

<body onLoad="LoadMeFirst()">
<p>A simple paragraph</p>
<input type="button" id="myButton" value="MyButton" onClick="ClickME()" />

In the above code snippet example,

- The button properties are - TYPE,ID,VALUE
- The Event for

a) BODY is: onLoad
b) BUTTON is: onClick

- Method to access the HTML elements - getElementsByTagName

What is DOM selector in jquery (AKA JQuery Selector) ?

An excerpt from my article ( http://www.dotnetfunda.com/articles/show/1918/let-us-learn-jquery-part-2-of-9jquery-selectors )

jQuery selector($),the vital part of JQuery, allow Html elements to be selected and manipulated (Check out the 4th point of DOM answer provided above ) .It finds the elements by Element Name,Element ID or class and returns a sequence of matched DOM elements upon a successful match. We can they apply methods or logics on those collection for further processing.


$(Selector Expression)


jQuery(Selector Expression)

Types of JQuery Selectors
 - Single Element Name Selectors

- Multiple Selectors
- Id Selectors
- CSS Selectors
- Attribute Selectors
- Element Visibility Selectors
- Form Field Selectors
- Parent-Child Selectors

Hope this helps . Let me know in case you have any doubt.

Thanks & Regards,
RNA Team

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Skippyjoyce0 on: 12/2/2015 [Member] Starter | Points: 25

Dom is a cbbc icon remembered mainly for his iconic TV show Dick and DOm in the Bungalow with his main partner in crime DIck.

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response