Loop through elements, add an attribute [].forEach.call(document.querySelectorAll('input'), function(input) { input.setAttribute("spellcheck", "false") });