开发者

Toggle tables upon selection

开发者 https://www.devze.com 2022-12-22 10:11 出处:网络
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.

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

精彩评论

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

关注公众号