复选框和文本框的联动效果JS代码中的主要代码有哪些?
复选框和文本框的联动效果JS代码中的主要代码有哪些?
【实例代码】html xmlns=http://www。w3。org/1999/xhtml headtitle标题页-学无忧(www。xue51。com)/titlescript language=javascriptfunction chk(obj,txtIndex){var tmpInput = document。
getElementsByName(textfield)[txtIndex];//获取指定的文本框obj。checked?tmpInput。disabled=false:tmpInput。
disabled=true; //判断文本框是否处于选中状态}/script/headbodyform id=form1 name=form1 method=post action= input name=che type=checkbox value= onclick=chk(this,'0')/ input type=text name=textfield disabled=true /BR/ input name=che type=checkbox value= onclick=chk(this,'1')/ input type=text name=textfield disabled=true /BR/ input name=che type=checkbox value= onclick=chk(this,'2')/ input type=text name=textfield disabled=true /BR//form/body/html。
答:Option Explicit Private Sub Form_Load() Text1 = "双击文本框,文本框内容被全选的vb代码该如何写,请网友帮我" ...详情>>
答:详情>>