var data=document.all; for(j=0;j<data.length;j++){ if(data[j].disabled=false){ data[j].disabled=true; } }