Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试select使用 TeaVM Flavor HTML 模板设置下拉菜单。
select
虽然文档提到了如何使用静态选项列表来做到这一点,但它没有显示如何处理动态选项列表。
诀窍是使用html:value,它既适用于<input>标签也适用于<option>标签:
html:value
<input>
<option>
<select name="mySelect" html:bidir-value="myResult"> <std:foreach var="myOption" in="myList"> <option html:value="myOption"> <html:text value="myOption"/> </option> </std:foreach> </select>