how to get element by type in javascript code example Example: get all a tags javascript document.anchors