Skip to content

General

IT Notes → Javascript @ December 22, 2020

Access Elements:

  • GetElementBy.
  • GetElementById(Id).
  • GetElementsByName(Name).
  • GetElementsByTagName(TagName) TagName = * represents all elements. Also use lowercase.
  • DomObject.childNodes() gives all child nodes. You can iterate using for-in or use array index. A child node with nodeType = 1 is an element.

Reload a page:

  • location.href=”location.href”.
  • location.reload();
  • histoory.go(0);
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x