jQuery 의 each break 와 contine

740 단어 jquery
http://rmn190.iteye.com/blog/791605
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />

<select id="branchName">
    <option value="10">     </option>
    <option value="11">     </option>
    <option value="12">     </option>
    <option value="13">     </option>
</select>

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

<script>
	$("option").each(function(){ 
			if($(this).val() == 11){ 
				return false; // false    break,   return true     continure。
			} 
			alert($(this).val());
	});
</script>

좋은 웹페이지 즐겨찾기