我有一个单页jsf,其中包含一个selectOneRadio,我想将一个jQuery关联到这个组件。我希望每个选定的值都有一个函数jQuery start。
<h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
<p:outputLabel for="console" value="Console:" />
<p:selectOneRadio id="console" value="#{lotBean.model.type_lot}">
<f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
<f:selectItem itemLabel="PS4" itemValue="PS+" />
<f:selectItem itemLabel="Wii U" itemValue="Wii U" />
</p:selectOneRadio>
</h:panelGrid>发布于 2014-05-20 02:30:33
尝试(这需要在表单中)
JSF:
<p:selectOneRadio id="console" value="#{lotBean.model.type_lot}">
<f:selectItem itemLabel="Xbox One" itemValue="Xbox One" />
<f:selectItem itemLabel="PS4" itemValue="PS+" />
<f:selectItem itemLabel="Wii U" itemValue="Wii U" />
</p:selectOneRadio>Jquery:
var input = $( "form input:radio" ) https://stackoverflow.com/questions/23736789
复制相似问题