Document Object Model

Data structures.

HTMLCollection.

textareaObject.value

Not the innerHTML.

Element.ClassName.

OnClick = fn.

Not string “”.

Window.open(URL,name,specs,replace).

________________.

Var input = document.createElement("textarea");.

Var button = document.createElement("button");.

Input.name = "post";.

Input.maxLength = "5000";.

Input.cols = "80";.

Input.rows = "40";.

________________.

.appendChild(newListItem);.

________________.

Append ; in onclick = “fn()<semicolon_here>”

________________.

Iterate

Var list= document.getElementsByClassName("events");.

for (var i = 0; i < list.length; i++) {

Console.log(list[i].id);.

Second console output.

}.

________________.

Iterate over elements of class.

[].slice.call(document.querySelectorAll(".outbound")).forEach(function(el, i) {.

Updated: 2026 Aug 19