[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:
- querySelector, wildcard element match?
- Changing CSS pseudo-element styles via JavaScript [duplicate]
- Using querySelector with IDs that are numbers
- Using querySelectorAll to retrieve direct children
- Get element’s CSS selector (when it doesn’t have an id)
- JavaScript DOMParser access innerHTML and other properties
- How to use querySelectorAll only for elements that have a specific attribute set?
- Why does document.querySelectorAll return a StaticNodeList rather than a real Array?
- querySelector search immediate children [duplicate]
- How do I get the value of text input field using JavaScript?
- How do I set/unset a cookie with jQuery?
- Remove element by id
- Force DOM redraw/refresh on Chrome/Mac
- jQuery document.createElement equivalent?
- How to hide a in a menu with CSS?
- How can I access iframe elements with Javascript?
- How can I check if a scrollbar is visible?
- document.createElement(“script”) synchronously
- When does reflow happen in a DOM environment?
- Firing event on DOM attribute change
- How can I simulate a click to an anchor tag?
- Good ways to improve jQuery selector performance?
- Manipulating innerHTML removes the event handler of a child element? [duplicate]
- How do I programmatically click on an element in JavaScript?
- How to access CSS generated content with JavaScript
- Dynamically creating HTML elements using Javascript?
- AngularJS: How to run additional code after AngularJS has rendered a template?
- How to get the HTML for a DOM element in javascript
- Accessing the content of other tabs in a browser
- How to select all checkboxes with jQuery?
- querySelector vs. getElementById [closed]
- How to scroll down with Phantomjs to load dynamic content
- How to detect when an iframe has already been loaded
- Difference between DOM parentNode and parentElement
- Change ‘s option and trigger events with JavaScript
- HTML DOM: Which events do not bubble?
- HTML Table with vertical rows
- Add elements to the DOM given plain text HTML using only pure JavaScript (no jQuery)
- Is it possible to get reference to comment element/block by JavaScript?
- Are event handlers in JavaScript called in order?
- React, losing saved data in localStorage with useEffect after page refresh
- createElement vs. createElementNS
- How AJAX is done in github source browse?
- Why does document.body.offsetHeight + document.body.bottomMargin not equal document.documentElement.offsetHeight
- change html text from link with jquery
- JavaScript scrollTo method does nothing?
- Difference between document.addEventListener and window.addEventListener?
- QuerySelector for Web Elements Inside iframe
- JavaScript: Is it better to use innerHTML or (lots of) createElement calls to add a complex div structure? [duplicate]
- Why is iframe.contentWindow == null?