[id^='someId']
will match all ids starting with someId
.
[id$='someId']
will match all ids ending with someId
.
[id*='someId']
will match all ids containing someId
.
If you’re looking for the name
attribute just substitute id
with name
.
If you’re talking about the tag name of the element I don’t believe there is a way using querySelector
Related Contents:
- How to do a wildcard element name match with “querySelector()” or “querySelectorAll()” in JavaScript?
- JavaScript DOMParser access innerHTML and other properties
- Parse an HTML string with JS
- How may I sort a list alphabetically using jQuery?
- Changing website favicon dynamically
- Browser detection versus feature detection
- Get elements by attribute when querySelectorAll is not available without using libraries?
- Event when window.location.href changes
- Javascript get XPath of a node
- How do I create a link using javascript?
- Javascript/DOM: How to remove all event listeners of a DOM object?
- How do I check if an element is really visible with JavaScript? [duplicate]
- How do I do OuterHTML in firefox?
- How To Wrap / Surround Highlighted Text With An Element
- Why is the value of my input always empty if I store it in a variable?
- Find DOM element by ID when ID contains square brackets?
- Difference between “change” and “input” event for an `input` element
- How can I get the DOM element which contains the current selection?
- Difference between Node object and Element object?
- How to show Page Loading div until the page has finished loading?
- Using querySelectorAll to retrieve direct children
- What is innerHTML on input elements?
- What is the “hasClass” function with plain JavaScript?
- Get child node index
- How can I highlight the text of the DOM Range object?
- JavaScript accessing inner DOM of SVG
- javascript access parent DOM across domains?
- Javascript .querySelector find by innerTEXT
- How to access component methods from “outside” in ReactJS?
- Get element’s CSS selector (when it doesn’t have an id)
- Is innerHTML asynchronous?
- Difference between .tagName and .nodeName
- How to access HTML element without ID?
- How to unload a javascript from an html?
- Dynamic creation of table with DOM
- Where are constructors such as, `new Image()` and `new Option()`, documented?
- How to use querySelectorAll only for elements that have a specific attribute set?
- Count immediate child div elements using jQuery
- How to get nodes lying inside a range with javascript?
- contentDocument for an iframe
- querySelector search immediate children [duplicate]
- Retrieving value from with multiple option in React
- Add a link stylesheet dynamically in the [closed]
- Trying to set a span element equal to a variable value in a JS Rock, Paper, Scissors Game
- Best practice for embedding arbitrary JSON in the DOM?
- Is there a way to determine if a dropdown menu is open?
- What damage is done by document.write()? [duplicate]
- Is there really no way to expose the prototype of a html element in IE (
- Replacement for deprecated `keypress` DOM event
- Do events handlers on a DOM node get deleted with the node?