getelementsbyclassname

pull data from website using VBA excel multiple classname

随声附和 提交于 2019-12-18 02:58:08
问题 I know this has been asked many times, but haven't seen a clear answer for looping thru a div and findind tags with the same classname. My first question: If I have something like this: <div id="carousel"> <div id="images"> <div class="imageElement"> <img src="img/image1.jpg"> </div> <div class="imageElement"> <img src="img/image2.jpg"> </div> <div class="imageElement"> <img src="img/image3.jpg"> </div> </div> </div> So I want to get all the img Src in the div "images" along with other stuff

Shadow Root getElementsByClassName

蹲街弑〆低调 提交于 2019-12-14 03:45:18
问题 I am using LitElement to create custom Web Components. I am fairly new at it and decided to try making image slideshow. I used W3Schools slideshow as reference while modifying it to work as LitElement. The problem is, that when I am trying to use document.getElementByClassName I am not getting anything. I am familiar with this issue since I am working with Shadow DOM so I changed it to this.shadowRoot.getElementsByClassName. Unfortunately, I get told that what I am trying to use is not a

VBA Web Scraper: Having trouble activating a search button via .Click

痴心易碎 提交于 2019-12-13 16:23:13
问题 Hopefully this is a really easy question. I'm using IE11 with the HMTL Object Library and Internet Controls references activated. I'm not very good with VBA so there might be a lot of noise in my code. There's no element ID on the button but am able to use ie.Document.getElementsByClassName by adding some html and xml declarations thanks to this post. I'm taking a name and city, state from excel and plugging it into the website then clicking the search button but this is where my error occurs

GetElementsByClassName Not Working As Expected [duplicate]

ぃ、小莉子 提交于 2019-12-13 10:49:07
问题 This question already has answers here : What do querySelectorAll and getElementsBy* methods return? (9 answers) Closed 5 years ago . I have a table that typically looks like this on the screen: The multiple rooms are displayed by using a foreach loop. Now I need to disable all the second dropdown boxes when a value has been selected in one of the first ones, or vice versa. Typical code for one of the dropdown boxes is <select onchange="std()" class="numrooms" name="numrooms[4]"> <option

How exactly does getElementsByClassName work in Chrome?, specifically w.r.t. NodeLists & DOMs

点点圈 提交于 2019-12-12 17:04:54
问题 All of the following results were obtained using Google Chrome v36 & its console. While debugging a Wordpress plugin, I discovered that running this little Javascript snippet console.log(document.getElementsByClassName("switch-tmce")) console.log(document.getElementsByClassName("switch-tmce").length) would log the following (expanded after the page finished loading): [item: function, namedItem: function] 0: a#ninja_forms_field_10-tmce.hide-if-no-js.wp-switch-editor.switch-tmce 1: a#ninja

addClass to getElementsByClassName array

不羁岁月 提交于 2019-12-12 15:07:12
问题 I need a little help as i am getting frustrated with .getElementsByClassName. I have an svg map that has paths with classes. I now need to list all with a certain class and add another class. Right now i have var testarray = (document).getElementsByClassName("currentclass"); for(var i = 0; i < testarray.length; i++) { testarray.item(i).className("classtobeadded"); } This returns me a "undefined is not a function" error. I've tried $(document), (document), (jQuery), i've tried $(".currentclass

javascript getElementsByClassName not working with <select> [duplicate]

99封情书 提交于 2019-12-12 05:16:48
问题 This question already has answers here : How to use getElementsByClassName in javascript-function? [duplicate] (3 answers) Closed 5 years ago . I am trying to use getElementsByClassName to make my select's options jump to their URL's depending on the value: http://www.example.com/?page_id="value" Here's what I've done: http://jsfiddle.net/VvLXk/2/ But it's not working. I know I can use the getElementByID but I have three select elements (and I might add more). I believe it only applies to one

use getelement to get class with several values

痴心易碎 提交于 2019-12-12 01:44:15
问题 I am using VBScript and getElementsByClassName to get data from HTML to Excel. Unfortunately, a site has changed their coding, so now I am unsure how to get the data in the class, since it is now divided into several parts. The page source looks like this: <span class="mod-tearsheet-recommendation__visual__column"> <i data-recommendation-count="5" style="background-color:#458B00; height:25%"></i> <i data-recommendation-count="2" style="background-color:#74A840; height:10%"></i> <i data

get element by classname for IE11

≡放荡痞女 提交于 2019-12-11 19:52:24
问题 I've an issue with queryselectorall and IE11. It works on IE10 and firefox but with last cheet Do you have a solution for having an element by his classname? if(document.querySelectorAll(".classname")) { alert('ici'); document.querySelectorAll(".classname").style.display = "none"; } The alert and display none is working on everything except Internet Explorer 11 thanks 回答1: http://jsfiddle.net/r3XCd/12/ if (typeof document.querySelectorAll !== undefined) { if (document.querySelectorAll("

Print list of attributes from a CSS class

梦想与她 提交于 2019-12-11 11:44:58
问题 I tried to print the list of attributes values in a specific CSS class with the getElementsByClassName method like below : <html> <head> <style> .toto { width:200px; height:50px; background-color:red; } </style> </head> <body> <div id="lol" class="toto"></div> <script language="javascript" type="text/javascript"> var toto = document.getElementsByClassName('toto'); if (toto) { for (int i; i < toto.length; i++) document.write(toto[i]); } </script> </body> </html> But toto.length = 1 in all