<p> 1.你为什么喜欢上网?
    <input   type= "checkbox"   name= "Q3"   value= "1">   Contact   information   </label>
    <input   type= "checkbox"   name= "Q3"   value= "2" onclick="aaa(this)">   Other </label>
    <br>
  Please   specify:<input   type= "text"  id="text1" name= "Q3Other"   style= "width:300px;display:none"> <br>
  <script language="JavaScript">
  
  function aaa(obj){
 if(obj.checked==true)document.getElementById("text1").style.display=""; else document.getElementById("text1").style.display="none";  }
  
 
 </script>

解决方案 »

  1.   

    <p> 1.你为什么喜欢上网?
        <input   type= "checkbox"   name= "Q3"   value= "1">   Contact   information   </label>
        <input   type= "checkbox"   name= "Q3"   value= "2" onclick="this.checked==true?text1.style.display='':text1.style.display='none';">   Other </label>
        <br>
      Please   specify:<input   type= "text"  id="text1" name= "Q3Other"   style= "width:300px;display:none"> <br>
      

  2.   

    CSS的style.display属性可以用来控制控件的显示。相关网站和例子:
    http://msdn2.microsoft.com/en-us/library/ms530751.aspx
      

  3.   

    <p> 1.你为什么喜欢上网?
      <label><input type= checkbox  name= Q3 value="1">Contact information</label>
      <label><input type= checkbox  name= Q3 value="2" onClick="document.getElementById('Q3Other').parentNode.style.display=this.checked?'block':'none'">Other</label>
      <div style="display:none;">Please specify:&nbsp;<input type="text" name="Q3Other" style="width:300px"></div>
    </p>
      

  4.   

    <p> 1.你为什么喜欢上网?
      <label><input type= checkbox  name= Q3 value="1">Contact information</label>
      <label><input type= checkbox  name= Q3 value="2" onClick="document.getElementById('Q3Div').style.display=this.checked?'block':'none'">Other</label>
      <div id="Q3Div" style="display:none;">Please specify:&nbsp;<input type="text" name="Q3Other" style="width:300px"></div>
    </p>