For-example I\'ve got a code:
相关标签: 8条回答 春和景丽 2021-01-06 00:23 <form name="form" action="" method="post"> <table> <tr> <td> <select name="one" onchange="if (this.value=='yes'){this.form['yes'].style.visibility='visible'}else {this.form['yes'].style.visibility='hidden'};"> <option value="" selected="selected">Select...</option> <option value="yes">yes</option> <option value="no">no</option> </select> <input type="text" name="yes" style="visibility:hidden;"/> </td> </tr> </table> </form> 0 讨论(0) 发布评论: 提交评论 加载中... 不要未来只要你来 2021-01-06 00:25 First of all enclose your td in a tr and then below is the DEMO http://jsfiddle.net/3Snmh/5/ 0 讨论(0) 发布评论: 提交评论 加载中... 上一页 1 2 验证码 看不清? 提交回复 热议问题
<form name="form" action="" method="post"> <table> <tr> <td> <select name="one" onchange="if (this.value=='yes'){this.form['yes'].style.visibility='visible'}else {this.form['yes'].style.visibility='hidden'};"> <option value="" selected="selected">Select...</option> <option value="yes">yes</option> <option value="no">no</option> </select> <input type="text" name="yes" style="visibility:hidden;"/> </td> </tr> </table> </form>
First of all enclose your td in a tr and then below is the DEMO
td
tr
http://jsfiddle.net/3Snmh/5/