解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script src="http://code.jquery.com/jquery-1.11.0-beta1.js" type="text/javascript"></script>
    <script>
    $(function () {
    $("input[type='checkbox']").each(function(){
    if($(this).prop('value') == '998'){
    alert('存在998');
    }
    })
    });
    </script>
    </head>
    <body> <div class='select'>
    <input type="checkbox" value="958" name="958" onclick="Getselected(this)">aa <input type="checkbox" value="999" name="958" onclick="Getselected(this)">aa <input type="checkbox" value="991" name="958" onclick="Getselected(this)">aa <input type="checkbox" value="998" name="958" onclick="Getselected(this)">aa <input type="checkbox" value="997" name="958" onclick="Getselected(this)">aa <input type="checkbox" value="996" name="958" onclick="Getselected(this)">aa
    <div></body>
    </html>
      

  2.   

    var selectvalue=908
    alert($('div.select input[value='+selectvalue+']').size())
      

  3.   

    如果不用jquery的话,就用javascript遍历,用document的getElementsByTagName或getElementsByName获得集合,遍历检测value值