HTML and CSS Reference
In-Depth Information
}
[...]
<form action="#" method="get">
<div>
<label for="chooseOption[1]">Option One:</label>
<input type="radio" name="chooseOption"
id="chooseOption[1]" value="1">
<fieldset class="extra disabled">
<label for="option1extra">Extra Info for Option One
</label>
<textarea name="option1extra" id="option1extra"></textarea>
</fieldset>
</div>
<div>
<label for="chooseOption[2]">Option Two:</label>
<input type="radio" name="chooseOption"
id="chooseOption[2]" value="2" checked="checked">
<fieldset class="extra">
<label for="option2extra">Extra Info for Option Two
</label>
<input type="text" name="option2extra" id="option2extra">
</fieldset>
</div>
</form>
Using a combination of CSS3 selectors, you can achieve similar effects
without JavaScript. Using the same markup as the previous example, the
CSS would look like this:
fieldset.extra {
display: none;
}
Search WWH ::




Custom Search