zoukankan      html  css  js  c++  java
  • 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();//贷款方式
    
  • 相关阅读:
    MySQL导出数据库
    Struts2拦截器的应用
    Java JVM
    Http协议状态码
    6.过滤器(Filter)
    5.监听器(Listener)
    4.会话管理(Session)
    3.Servlet(二)
    2.Servlet(一)
    1.搭建JavaEE开发环境
  • 原文地址:https://www.cnblogs.com/Wbely/p/3912551.html
Copyright © 2011-2022 走看看