Jquery获取html中select,radiobutton选中的值写法

1.Html代码:
<select name="" class="qixian" id="tbCheckCycleUnit">
                      <option value="1"></option>
                      <option value="2"></option>
                      <option value="3"></option>
 </select>
  说明:id为tbCheckCycleUnit选中的值
  写法:var CheckCycleUnit = $("#tbCheckCycleUnit  option:selected").text();
2.html代码:
<div class="zqbb_mz"><span class="zqbd_mingz">贷款方式:</span><p>
               <label class="daikaun">
                  <input type="radio" name="category" value="category1" id="category1"  class="xy_xuan" />
                  <span class="xy">信用</span></label>               
                <label class="daikaun">
                  <input type="radio" name="category" value="category5" id="category5" class="xy_xuan" />
                  <span class="xy">抵押</span></label>              
                <label class="daikaun">
                  <input type="radio" name="category" value="category2" id="category2" class="xy_xuan"/>
                 <span class="xy">担保</span></label>
              </p></div>
说明:name为catogry的一组radio选中的值
写法:var BidCategory = $("input[name='category']:checked").val();//贷款方式
原文地址:https://www.cnblogs.com/Wbely/p/3912551.html