怎样利用javascript,一个checkbox控制多个textbox
一个checkbox控制一个textbox我会,在pageload里,加上
checkbox.attributes[ "onclick "]= "document.getElementById( ' " + txt1.clientid + " ').disabled=this.checked; ";
再加一个txt2,怎么写?
------解决方案--------------------checkbox.attributes[ "onclick "]= "document.getElementById( ' " + txt1.clientid + " ').disabled=this.checked;document.getElementById( ' " + txt2.clientid + " ').disabled=this.checked; ";
------解决方案--------------------checkbox.attributes[ "onclick "]= "document.getElementById( ' " + txt1.clientid + " ').disabled=this.checked;document.getElementById( ' " + txt2.clientid + " ').disabled=this.checked; ";
txt1.Attributes[ "disabled "] = "true ";
txt2.Attributes[ "disabled "] = "true ";