<div id="text">
<input type="text" />
<input type="text" />
</div>
<input type="Checkbox" id="box" />
window.onload = function(){
var a = document.getElementById("text").getElementsByTagName("input");
document.getElementById("box").onchange = function(){
var k = this.checked;
for(var i=0;i<a.length;i++) {
a[i].disabled = k;
}
}
}