The Element Selector Selects all elements with the given tag name. In the Element Selector we can list the names of the element to be selected in the parenthesis. For example $("h2")
will select all h2 element of the HTML page, similarly $("p")
will select all the paragraph elements of the page. We can use the element selector to select an element whose name is passed in the parenthesis inside $()
.
The Button selector selects all button elements and input elements when type = "button"
. We can select all buttons of the web page with button selector It does not select input elements of type submit. it is not part of the CSS specification and it's a jQuery extention.
Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request. With a little help of social engineering (such as sending a link via email or chat), an attacker may trick the users of a web application into executing actions of the attacker's choosing. If the victim is a normal user, a successful CSRF attack can force the user to perform state changing requests like transferring funds, changing their email address, and so forth. If the victim is an administrative account, CSRF can compromise the entire web application.
The radio selector selects all the elements that are of type radio in the web page. The radio selector is similar to the form $(“[type=radio]”)
. It is recommended that, it must start with colon (:
) preceding with tag name; otherwise by default it uses universal selector (*
) to select all the elements in the page. To make it clear, only using $( ":radio" )
is just equivalent to $( "*:radio" )
, so$( "input:radio" )
should be used instead. Lets look at a simple example for radio selector.
The Text Selector selects all input fields of type text. It does not select Textarea elements. We can select all text of the web page with Text Selector. The Test selector $( ":text" )
is equivalent to $( "*:text" )
. it not part of the CSS specification and it's a jqurry extention.
The :last
selector selects the last element. This selector can only select one single element. Use the :last-child
selector to select more than one element (one for each parent). This is mostly used together with another selector to select the last element in a group
ID Selector selects elements with the given id attribute. ID could be any value provided in the id attributes of the HTML element. The main advantage of this jquery selector is that we get separate control over each element through its unique ID. Jquery also uses the JavaScript function document.getElementById()
for selection . It is also possible to set styles for elements by using the ID attribute. The ID selector is a name with a hash character (#
) preceding it. Each element of HTML may have a unique ID attribute. The id selector matches an element based on the contents of the given id attribute which matches exactly the value given in the selector. Using the jQuery select by ID, it is also simple to get control over the element. We can use this selector whenever we want to access a specific element to perform some task. The combination of this selector could also improve versatility.
If we have given element with a specially named ID and do not have the class name attached that defines what we want to select, then we can make use of ID selection. The ID can be used to select one element in the DOM.
Odd is the simple mathematical term, An odd number is an integer which is not a multiple of two. The :odd
selector selects an odd index like 1, 3, 5, 7... etc for each table row. The odd Selector selects the second element, fourth element, and so on . The odd selector is an extension of jQuery and not part of the CSS specification.
The :input
selector in jQuery is used to select input elements. This selector also used with button element. it enable you to easily select input elements. We can select all Inputs of the web page with Input selector. The input selector selects not only input elements, but also dropdowns, buttons and Textarea elements.
We take the vision which comes from dreams and apply the magic of science and mathematics, adding the heritage of our profession and our knowledge to create a design.