SyntaxFix
Write A Post
Hire A Developer
Questions
I've tried all the possibilities. Nothing worked for me except the following. var element = document.querySelectorAll("input[id=btn1]"); element[0].setAttribute("disabled",true);