日期:2014-05-16 浏览次数:20482 次
<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: <input type="text" name="Q3Other" style="width:300px"></div>
</p>
------解决方案--------------------
人家都给你正解了!
------解决方案--------------------
<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: <input type="text" name="Q3Other" style="width:300px"></div>
</p>