Top "Getelementsbytagname" questions

A native HTML DOM Element method used to get all elements with the specified tag name.

Javascript getElement by href?

I've got the script below var els = document.getElementsByTagName("a"); for(var i = 0, l = els.length; i < l; i++) { …

javascript href getelementsbytagname
How to loop through all the elements returned from getElementsByTagName

I am trying to loop through all the elements retruned from getElementsByTagName("input") using forEach. Any ideas why this does …

javascript arrays foreach getelementsbytagname
How to insertBefore() element in body tag?

I am trying to use insertBefore in js like this: var p = document.createElement("p"); p.innerHTML = "test1"; document.body.…

javascript dom insert getelementsbytagname
How do I get all h1,h2,h3 etc elements in javascript?

I want to write something like this in javascript: var all_headings = document.getElementsByTagName("h1,h2,h3,h4,h5,h6"); …

javascript html getelementsbytagname
Can I select multiple tags using getElementsByTagName?

I'm using a javascript snippet in order for visitors to my site to increase the font size on all paragraphs …

javascript html getelementsbytagname
change value of text using getElementsByName

I have firstName text that I want to change his value but it not work - <input type="text" …

javascript html forms getelementsbytagname
Use vanilla javascript to add / remove class to a different element after clicking on another one

I have looked through a number of similar questions but can not find a specific example of one that answers …

javascript class getelementsbytagname getelementsbyclassname
jquery - get elements by tag within a specific div?

I'm trying to get all input elements within a certain div, but it seems to return all inputs on any …

jquery getelementsbytagname
GetElementsByTagName in Htmlagilitypack

How do I select an element for e.g. textbox if I don't know its id? If I know its …

c# webbrowser-control html-agility-pack getelementsbytagname
How to insert metatag without using jquery append?

I used the following jquery to insert a metatag into a html document. <script type="text/javascript"> if(…

javascript append meta-tags getelementsbytagname