使用jquery在select控件中根据option的value值得到对应文本的值
求解

解决方案 »

  1.   

    $("select option:selected").text();
    $("select option[value=" + v + "]").text();
      

  2.   

    http://www.phpplay.com/portal.php?mod=view&aid=31
      

  3.   

    var selectval = $('#select_id').val();//这个是得到被被中的option的value
    var selecttext = $('#select_id').find( 'option:selected ').text(); //这个是得到被选中的option的选项内容 
      

  4.   

    <!DOCTYPE html>
    <html>
    <head>
      <script src="../jquery.min.js"></script>
      <style></style>
    </head>
    <body>
      <div>
        <label>
          <input type="radio" name="newsletter" value="Hot Fuzz" />
          <span>name?</span>
        </label>
      </div>
      <div>
        <label>
          <input type="radio" name="newsletter" value="Cold Fusion" />
          <span>value?</span>
        </label>
      </div>
      <div>
        <label>
          <input type="radio" name="newsletter" value="Evil Plans" />
          <span>value?</span>
        </label>
      </div>
      <script>$('input[value="Hot Fuzz"]').next().text(" Hot Fuzz");</script>
    </body>
    </html>