DOM Manipulation Via JS

JavaScript Method: .addEventListener

The JS method .addEventListener targets HTML tags via JS through the DOM for use with event helpers(such as 'click', 'keyup' and 'keydown').Format of this method is as follows:

'HTMLtag'.addEventListener('EventHelper','CallbackMethod')

Ways to grab HTML tags via JS

All of these JS methods are bundled into the jQuery method $('')

document.querySelector("<** #/.classname **>") finds any HTML tag. Needs to prepend ./# based on ID or class.

document.createElement("<** element **>")Creates new HTML element

dogument.getElementById("<** ElementID **>")Selects HTML tag by Id

.children Returns Child HTML tags as an array

.appendChild("<** HTML tag **>")appends Child HTML tag and associated children of Child HTML to HTML tag(use querySelector, getElementById before this method)