Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JSF2.0 Jquery/JS在Javascript/Jquery中检索selectOneRadio的值_Jquery_Jsf - Fatal编程技术网

JSF2.0 Jquery/JS在Javascript/Jquery中检索selectOneRadio的值

JSF2.0 Jquery/JS在Javascript/Jquery中检索selectOneRadio的值,jquery,jsf,Jquery,Jsf,我正在开发一个JSF2.0应用程序。如何检查从Java脚本/jquery代码中选择了哪个单选按钮 我的单选按钮代码是 <t:selectOneRadio id="options" value="#{reqscope.selectedRadio}" layout="spread"> <f:selectItem itemValue="policynum" itemLabel="Policy number" /> <f:selectI

我正在开发一个JSF2.0应用程序。如何检查从Java脚本/jquery代码中选择了哪个单选按钮

我的单选按钮代码是

   <t:selectOneRadio id="options" value="#{reqscope.selectedRadio}" layout="spread">
        <f:selectItem itemValue="policynum" itemLabel="Policy number" />
        <f:selectItem itemValue="custId" itemLabel="Customer ID" />    
</t:selectOneRadio>


   <t:radio for="options" index="0"  name="search_by1" onclick="policyradioselected()" />
    <t:radio for="options" index="1"  name="search_by" onclick="customerradioselected()" />

假设生成的html对于输入是这样的,则应该可以工作:

<input type="radio" name="options" id="options:0" value="Yourvalue1" />

<input type="radio" name="options" id="options:0" value="Yourvalue1" />