日期:2014-05-16  浏览次数:20270 次

JS一个简单的问题,如果选择了other就显示一个文本输入框
我有一个复选框的域,里面有A,B,C,D,Other的选项,我现在想如果用户选择了Other后就在底下蹦出个文本输入框,如果没有,那那个
框就不出现,怎么写?新手,希望能给出点提示。

------解决方案--------------------
<input type= "checkbox " onclick= "o=document.getElementById( 't ');t.style.display=t.style.display== ' '? 'none ': ' ' "> D
<input type= "text " id= "t " style= "display:none ">