Código HTML:
<form onsubmit="return myFunc();">
<input type="text" name="algo" />
<input type="text" name="algo" />
<input type="text" name="algo" />
<input type="text" name="algo" />
<input type="text" name="algo" />
<input type="text" name="algo" />
<input type="text" name="algo" />
</form>
<script type="text/javascript">
function myFunc(){
var inputs = document.getElementsByTagName('algo');
for(i in inputs){
inputs[i].disabled='disabled';
}
return;
}
</script>