晕  这个是笔误啦  disabled
不是这个原因的

解决方案 »

  1.   

    明天了  应该是b.checked
    哈哈散分撒分
      

  2.   

    <input name="rb" type="checkbox" id="rb" onClick="test()" value="1">
    <script.....>
    function test()
    {
    if (form1.tb.value=="1")//这里引号
    {
    form1.ta.value="hello";
    form1.ta.disables=true;
    }
    else
    {
    form1.ta.value=" ";
    form1.ta.disables=false;
    }
    }
    </script>
      

  3.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <body> <form name="form1" method="post" action="">
       <input name="rb" type="checkbox" id="rb" onClick="form1.ta.disabled = !(form1.ta.disabled);if(this.checked){ form1.ta.value = 'hello';}else{form1.ta.value = '';}" value="1">
       <tr><input type="text" name="ta"></td></tr>
     </form>
    </body>
    </html>
      

  4.   

    form1.tb.value==1不是这样判断的form1.tb.checked==true|false关于日期的常见操作
    http://community.csdn.net//Expert/TopicView2.asp?id=4360247&datebasetype=now
    js FAQ贴
    http://community.csdn.net//Expert/TopicView2.asp?id=4356360&datebasetype=now
    DHTML手册,js手册,dom手册下载
    http://community.csdn.net//Expert/TopicView2.asp?id=4356325&datebasetype=now
      

  5.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <script language="JavaScript">
    function test(i) {
    var frm = i.form;
    if (i.checked == true) {
    frm.ta.value = "hello";
    frm.ta.disabled = true;
    } else {
    frm.ta.value = "";
    frm.ta.disabled = false;
    }
    }
    </script>
    <title>无标题文档</title>
    </head><body>
    <form id="form1" name="form1" method="post" action="">
      <input type="checkbox" name="rb" value="1" onClick="test(this)" />
      <input type="text" name="ta" />
    </form>
    </body>
    </html>