getelementsbytagname

Getting attribute values in VBA

一世执手 提交于 2020-01-02 08:24:55
问题 I need to make a VBA file that will read a webpage and return the value of the SRC attribute of the IMG tag. I wasn't able to make the last step work. Can you guys help me? <html> <body> <img src="image.jpg"> </body> </html> ===Edit=== I managed to return the attribute object. Now I need to return its value Option Compare Database Sub AcessaPagina() Dim ie As InternetExplorer Dim test As String Dim obj As Object Set ie = New InternetExplorer ie.Navigate "http://www.google.com.br" MsgBox ie

Is it possible to make querySelectorAll live like getElementsByTagName?

五迷三道 提交于 2020-01-01 04:26:25
问题 getElementsByTagName() has 2 great features: it is fast and it is live. But what if I want to get p strong . Of course I could refine a selection using getElementsByTagName() again but wouldn't I lose the live effect for the new p tags? Is there a way to turn querySelectorAll into a live selector? Or... is there a way to use getElementsByTagName() and getElementsByClassName() to create a function that works in a similar way (at least with descendants) as querySelectorAll but being live? 回答1:

Is it possible to make querySelectorAll live like getElementsByTagName?

会有一股神秘感。 提交于 2020-01-01 04:25:08
问题 getElementsByTagName() has 2 great features: it is fast and it is live. But what if I want to get p strong . Of course I could refine a selection using getElementsByTagName() again but wouldn't I lose the live effect for the new p tags? Is there a way to turn querySelectorAll into a live selector? Or... is there a way to use getElementsByTagName() and getElementsByClassName() to create a function that works in a similar way (at least with descendants) as querySelectorAll but being live? 回答1:

使用Vue怎么解决跨域请求问题?

做~自己de王妃 提交于 2019-12-30 22:36:56
在使用vue前先看原生js解决跨域 使用的接口: http://suggestion.baidu.com/su?cb=qq&wd=哈哈 body内容: < input type = "text" > < button > 提交 < / button > < ul > < / ul > < script > //查找对应的表单元素 var ipt = document . getElementsByTagName ( "input" ) [ 0 ] ; var btn = document . getElementsByTagName ( "button" ) [ 0 ] ; var oul = document . getElementsByTagName ( "ul" ) [ 0 ] ; //给btn添加点击事件 btn . onclick = function ( ) { //当点击按钮的时候利用script的src属性提交请求→新建一个script标签 var s = document . createElement ( "script" ) ; //给这个标签的src属性赋值 赋值时在wd后面的参数是需要查找的关键字,这个值是用户在input中输入的值 s . src = `http://suggestion.baidu.com/su?cb=callback&wd= ${

Android WebView Compile a Form and submit with Javascript

妖精的绣舞 提交于 2019-12-30 10:58:53
问题 I'm trying to complete this form : http://www.lbalberti.it/whatsup.asp?codist=57247 I was able to insert value to the two textbox but the button doesn't work. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home_page); final String user = getIntent().getStringExtra("username"); final String psw = getIntent().getStringExtra("password"); MyWebView view = new MyWebView(this); view.getSettings()

无缝滚动

霸气de小男生 提交于 2019-12-29 23:58:53
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style> *{margin:0px; padding:0px;} #div1{width:830px; height:166px; margin:50px auto; position:relative; background:white; overflow:hidden;} #div1 ul li{float:left; width:174px; height:166px; list-style:none; } ul{position:absolute;} </style> <script> window.onload=function(){ var oDiv=document.getElementById('div1'); var oUl=oDiv

getElementsByTagName specific links only

这一生的挚爱 提交于 2019-12-25 09:21:22
问题 I'm trying to use Anarchy Media Player on my site but had to change code a bit because my media files/urls are not in standard format. It pulls the video files now but javascript is finding ALL links and tries to add player to it. I even added id "video" to video link but still finds all links on the page and adds player to it. How can I separate those links to get player added to them only? Here is the part of the javascript that looks for the links: var all = document.getElementsByTagName(

VBA cannot get data from HTML with .getElementsByTag() nor .getElementByID()

懵懂的女人 提交于 2019-12-25 03:29:30
问题 My current project consists of retrieving data from HTML source code. Specifically, I am looking at crash cases on this website: https://crashviewer.nhtsa.dot.gov/nass-cds/CaseForm.aspx?xsl=main.xsl&CaseID=112007272 I would like to gather all relevant data from the HTML by looking for .innertext of specific tags/IDs. My code so far: Sub ExtractData() mystart: 'First I create two Internet Explorer object Set objIE = CreateObject("InternetExplorer.Application") 'this browser contains the list

getElementsBy() extract text

非 Y 不嫁゛ 提交于 2019-12-25 01:30:03
问题 I'm really new to VBA and I've been trying to get the value below the Column "Impuesto". I'm getting error 438. I still don't quite understand how to refer to a certain part of the web page. Sub extract() Dim myIE As Object Dim myIEDoc As Object Dim element As IHTMLElement Set myIE = CreateObject("InternetExplorer.Application") myIE.Visible = False myIE.navigate "https://zonasegura1.bn.com.pe/TipoCambio/" While myIE.Busy DoEvents Wend Set myIEDoc = myIE.document Range("B1") = myIEDoc

Make WebBrowser click a button on a webpage with a specific class ONCE in VB.net

橙三吉。 提交于 2019-12-24 13:41:27
问题 I'm trying to make the webbrowser click on a specific button within a webpage: The html code for the button is something like <a class="btn btn-large play"> and the code I have so far to click this button is: For Each Element As HtmlElement In WebBrowser2.Document.GetElementsByTagName("a") If Element.OuterHtml.Contains("btn btn-large play") Then Element.InvokeMember("click") End If This works, but it makes the Webbrowser click the button again and again. Any idea how I can only make it do so