how to exclude a specefic tagname from a javascript query search

JavaScript
var elems = document.querySelectorAll("body > *:not()");
//tag will go inside the not function like so:
var elems = document.querySelectorAll("body > *:not(img)");
Source

Also in JavaScript: