html:select in html:select? Is it possible?
Is it possible one of the options of html:select tag to be another select? And if not,开发者_如何学Go how can I achieve this result using Struts?
Take the following code and run it in a few browsers:
<select>
<option value="c0">Option c0</option>
<option value="c1">
<select>
<option value="c1_prime_1">Option c1 prime 1</option>
<option value="c1_prime_2">Option c1 prime 2</option>
</select>
</option>
<option value="c2">Option c2</option>
<option value="c3">Option c3</option>
</select>
You will find that the answer to your question is No!
Even if it were possible for Struts to have a html:select inside an html:option tag it would not matter since those tags output HTML and the result would be like the one above which does not deliver on what you want.
I guess you could mimic the functionality of a select with divs and javascript and display something that looks like a select with options that are other selects but that won't be a select with a select option, it will just look like one.
精彩评论