开发者

Toggle tables upon selection

I h开发者_如何学Cave a select element with a few options. Depending on what is selected, I would like to toggle the display for inherited data.

<select>
     <option>Option "A"</option>
     <option>Option "B"</option>
</select>

<table>
     <tr><th>TABLE A SELECT</th></tr>
</table>

<table>
     <tr><th>TABLE B SELECT</th></tr>
</table>

option "A" selected - Auto Display TableA

option "B" selected - Auto Display TableB


assign the tables an ID, catch the select's onchange event, in the event get the selected item. If they selected A set the display style of table A to block and table B to none, or vice-verse if they select B...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜