window.onload = function(){
var inputElement = document.getElementsByTagName('input');
console.log(inputElement);
console.log(inputElement.hasAttribute('placeholder'));
if(inputElement.hasAttribute('placeholder')){
console.log('true');
}
};
I keep getting a an TypeError on window.onload. Could someone point whats wrong with this, i am trying to to check if an input element has a placeholder attribute