Questions tagged [queryselector]
The queryselector tag has no usage guidance.
queryselector
467
questions
0
votes
1
answer
33
views
How to use sibling combinator together with `:scope` in `querySelector`
Let's say I have an element and I want to select the next matching sibling. Normally, in css I'd be able to write <some selector for this element> ~ <selector for sibling>, but the sibling ...
0
votes
1
answer
40
views
How to detect if Youtube ad is currently playing with JavaScript
In JavaScript I need to detect if YouTube ad is currently playing, my code is not working for me. This is a single page personal project no need to use YouTube Data API.
function ...
0
votes
0
answers
17
views
How to use data attribute values as the context for mark.js?
I'm trying to use Mark.js to find a search value in data attribute values. When a match is found, I'd like to highlight the attribute's element. In the HTML below, I want to highlight .terms, when a ...
0
votes
0
answers
60
views
How to send a HTTP request including additional Information with VBA to this public website and scrape data from it to Excel?
I need a calculated value from this public Website:
land guidelines
First I enter a complete address in the search field, e.g. "Swinemünder Straße 12, 22147 Hamburg", after the address has ...
2
votes
0
answers
54
views
querySelector does not work as expected in Vue components
I'm new to vue.js and I've encountered a problem that I can't fix.
In my SelectField.vue component I have written the following method:
getModalBodyElement() {
return document.querySelector('....
1
vote
1
answer
42
views
in Firefox querySelector with attribute while finding path in svg gives error
My code is working well in Chrome but not in Firefox.
When I search path element using querySelector with attribute Firefox gives an error that path is not found.
defs.appendChild(svgGradient);
const ...
0
votes
1
answer
48
views
How to extract data from this website with VBA queryselector
I need to extract the 'href' from the html code of this website that is public and without any login:
(To access the page via xmlhttp, it needs a REFERER, that is posted as REFSTRING)
Public Website
...
0
votes
2
answers
42
views
How to select all the input elements except for the ones within a specific element
I want to select all the inputs in a form except those within a specific element.
Consider the following sample HTML:
<form id="myForm">
<input />
<input />
&...
1
vote
4
answers
70
views
Use wildcards to trace an a.href in the querySelectorAll NodeList
Let's say that instead of looking at the ID, I want to select all a.href elements that contain (a piece of) this example: if document.url is "www.youtube.com".
var youtubeID = document....
0
votes
0
answers
6
views
Issue accessing a sub element
I've got an application that manages real estate transactions, amongst other things. When an offer comes in basic information is collected; buyers name, selling agent name, email, phone, etc. . . If ...
0
votes
0
answers
45
views
If I only have access to a Node, how can I achieve something like Element.querySelector?
Assume you're not able to access an Element type, only a Node type. (I have this constraint because I'm using inject(ElementRef) in Angular, but there are other cases where it might happen)
A Node ...
0
votes
0
answers
18
views
Replacing Text using Javascript
const text5 = document.querySelector('#p3');
text5.textContent = "Hello World";
div#Can span#Orig {
display: show;
}
div#Can:hover span#Orig {
display: none;
}
div#Can span#p3 {
display: none;...
-1
votes
2
answers
44
views
document.querySelector is returning null for a very simple beginner problem. I have no idea why [duplicate]
html is basically boiler plate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="...
2
votes
0
answers
38
views
Finding elements in Flask + Jinja
I am trying to create an flask app that uses Jinja templating. I have a navbar that contains links with the class name 'nav-link'. They are in base.html. I dynamically create index.html. Later I try ...
0
votes
1
answer
36
views
In Javascript, how can I querySelector to get the innerHTML excluding one of the inner sibling divs
I have the following html:
<body>
<span class="comment">
EXAMPLES:
<p><i>Example 1</i> - <a href="https://example.com/1">...