日期:2014-05-16 浏览次数:20471 次
<div class='select'>
<input type="checkbox" value="958" name="958" onclick="Getselected(this)">aa
<div>
<input type="checkbox" value="999" name="958" onclick="Getselected(this)">aa
<div>
<input type="checkbox" value="991" name="958" onclick="Getselected(this)">aa
<div>
<input type="checkbox" value="998" name="958" onclick="Getselected(this)">aa
<div>
<input type="checkbox" value="997" name="958" onclick="Getselected(this)">aa
<div>
<input type="checkbox" value="996" name="958" onclick="Getselected(this)">aa
<div>
<!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>
var selectvalue=908
alert($('div.select input[value='+selectvalue+']').size())