我想在 html 中执行此操作:
<div class="input-group" id="name">
<input type="text" class="form-control" name="name" placeholder="Name">
<span class="input-group-addon"><a href="#" class="none" id="name">None</a></span>
</div>
我在 GWT Bootstrap 中尝试这个:
<b:InputGroup>
<b:TextBox b:id="name" placeholder="Name"/>
<b:InputGroupAddon>
<b:Anchor ui:field="noName" text="None"/>
</b:InputGroupAddon>
</b:InputGroup>
但因此我得到了错误:
Illegal child <b:Anchor text='Name' ui:field='noName'> in a text-only context. Perhaps you are trying to use unescaped HTML where text is required, as in a HasText widget?: <b:InputGroupAddon> (:56)
为什么?b:Anchor 实现 HasText 接口。
我的目标是添加一个链接,当用户单击输入时,该链接将填充值 NONE