2013-12-12 55 views
1

我在Struts2的形式如下:Struts 2和html標籤?

<s:form > 
    <s:select list="#session.circleIdNameMap" label="Select Circle:" 
     headerKey="-1" headerValue="Select Circle" 
     id="selectCircleDropDown" onchange="getTspList(this.value)"></s:select> 

    <select id="selectTspDropDown"></select> 

    <s:radio list="#{'0':'Default','1':'Latest'}" label="Select Threshold type:" 
     name="flag" id="flag"></s:radio> 

    <s:submit type="button" onclick="getThresholdData();return false;" /> 

</s:form> 

我在這裏使用HTML select標籤之間,由於它有一個定位問題。第二個選擇標籤出現。使用簡單的主題,一切都在一條線上。

我應該怎麼做才能使對齊正確?

+0

我建議你看看生成的HTML代碼。另外爲什麼不使用S2選擇標籤? –

+0

如果您使用的是默認的「xhtml」主題,那麼還有其他一些HTML發佈。 –

+0

使用'simple'主題。 –

回答

0

HTML select標籤與option標籤一起使用。見the example。但是你可以使用struts select tag,這些選項是從列表值自動生成的。

+0

我正在使用jQuery填充我的選擇標籤,所以我知道html選擇標籤。我想要的是如何解決由於HTML和struts2標籤混合形成的對齊問題。任何想法?? –