How to create function for disable all element with button tag after 1 second in javascript? -
maybe it'll looks this:
var buttons = document.getelementsbytagname("button"); function disbtn(){ settimeout(function(){ (var = 0; < buttons.length; i++) { buttons[i].style.display = 'none'; } } , 1000); }
could please give me simple solution when call disbtn() function button tag in current page disabled after 1 second delay?
you can try:
var buttons = document.getelementsbytagname("button"); function disbtn(){ settimeout(function(){ (var = 0; < buttons.length; i++) { buttons[i].setattribute('disabled',true); } } , 1000); } disbtn();
Comments
Post a Comment