안규 공부방

Javascript & JQuery & CSS > JQuery Selector - Form 태그 지정 방법

등록일 : 2017-07-04 19:44 조회수 : 94,826

Form필더는 말 그대로 Form태그를 지정하는 태그 입니다.

다들 아시다시피 폼 태그에는 radiobutton, checkbox, submit등이 있습니다.

사용 방법은 기본 필터와 같습니다.

다만 폼태그를 사용한다 뿐 이겠죠?

폼 필터 중류를 보도록 하겠습니다.
	:button
		- 버튼 태그를 반환 합니다.

	:checkbox
		- 체크박스 태그를 반환 합니다.

	:checked
		- 체크박스에 체그가 된 엘리먼트를 반환 합니다.

	:image
		- 이미지 태그를 반환 합니다.

	:input
		- 인풋태그에 해당하는 모든 엘리먼트를 반환 합니다.

	:password
		- 텍스트 폼의 패스워드 타입을 반환 합니다.

	:radio
		- 라디오 버튼 태그를 반환 합니다.

	:reset
		- 리셋 버튼 태그를 반환 합니다.

	:selected
		- 셀렉터폼에 선택 된 엘리먼트를 반환 합니다.

	:submit
		- 서브밋 버튼 태그를 반환 합니다.

	:text
		- 텍스트 폼 태그를 반환 합니다.

	
--------------------------------------------------------------------------------

	사용법은 아주 다양해 질 수 있으며, Selector 또한 더 많이 존재 할 수 있습니다.
	
--------------------------------------------------------------------------------

	$('input:checked').length : input 태그중 check 되어 있는 태그의 길이를 구하라.
	$(':button') : <input type="button"/> 또는 <button />
	$(':checkbox') : <input type="checkbox"/>, 
	$('[type=checkbox]') : 위와 같음.
	$('*:checkbox') : 위와같음.
	$('input:checkbox') : 위와같음.
	$(':checked') : 체크박스에 체크된 Element
	$(':selected') : 콤보박스에 선택된 Element
	$(':disabled') : <input name="email" disabled="disabled" />
	$(':enabled') : 활성화되어있는 Element (jQuery(':disabled') 과 반대 )
	$(':file') : <input type="file"/> 
	$('*:file')	: 위와 같음.
	$('input:file')  :위와 같음.
	$(':image') : <input type="image" />
	$(':input') : <input />, <textarea />, <select />, <button />
	$(':password') : <input type="password" /> 
	$('[type=password]') :위와같음.
	$('*:password') : 위와 같음.
	$('input:password') :위와 같음
	$(':radio') : <input type="radio" />
	$('[type=radio]') : 위와 같음.
	$('*:radio') : 위와 같음.
	$('input:radio') : 위와 같음.
	$('input[name=gender]:radio') : 확장 예
	$(':reset') : <input type="reset" /> 
	$("input:reset") : 위와 같음.
	$(':selected') : <option selected="selected">....</option> 	(예) $("select option:selected")
	$(':submit') : <input type="submit" />, <button type="submit">Button type="submit"> </button> 또는 <button/>,  
	$(':text') : <input type="text" />, 
	$('[type=text]') : 위와같음.
	$('*:text')  : 위와 같음.
	$('input:text') : 위와 같음.


※ 혹시 도움이 되셨다면 댓글에 한마디 남겨주세요!
작성자   비밀번호
자동글 방지     (자동글 방지 기능입니다.)
내용   댓글달기 
이메일 문의 : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.