:reset 은 input 의 type=reset 인 요소를 찾습니다.
원문 링크
http://api.jquery.com/reset-selector/
- jQuery(':reset')
예 제
reset 버튼을 찾습니다.
<!DOCTYPE html>
<html>
<head>
<style>
textarea { height:45px; }
</style>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
<script>
var input = $("input:reset").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit
</script>
</body>
</html>
미리보기
뭐 딱히 추가할게 없어요 ^^;;;;
그럼 즐프하세요.
※ 본 예제는 http://www.jquery.com 에 있는 내용임을 밝힙니다.
'프로그래밍 > jQuery' 카테고리의 다른 글
| jQuery API 정복 - 눈에 보이는 요소 찾기 : visible (5) | 2011.02.24 |
|---|---|
| jQuery API 정복 - text 박스 찾기 : text (3) | 2011.02.24 |
| jQuery API 정복 - submit 버튼 찾기 : submit (4) | 2011.02.22 |
| jQuery API 정복 - select 박스에서 선택된 것 찾기 : selected (4) | 2011.02.22 |
| jQuery API 정복 - radio 버튼 찾기 : radio (2) | 2011.02.21 |
| jQuery API 정복 - type=password 인 것 찾기 : password (2) | 2011.02.18 |
| jQuery API 정복 - 다른 요소를 포함한 요소 찾기 : parent (2) | 2011.02.18 |
| jQuery API 정복 - 유일한 자식 요소 찾기 : only-child (8) | 2011.02.17 |