• 회원가입
  • 로그인
  • 구글아이디로 로그인

[attribute] HTML - autocomplete 속성 - 자동완성 여부 지정 (= autocomplete속성 = 오토컴플리트속성)

목차
  1. autocomplete 예제 - <form> 경우
  2. autocomplete 정의
  3. autocomplete 구문
  4. autocomplete 예제 - <form>과 <input> 속성값 다른 경우

 

autocomplete 예제 - <form> 경우

 

<form action="/action_page.php" method="get" autocomplete="on">

  <label for="name">이름:</label>

  <input type="text" id="name" name="name"><br>

  <label for="nick">별명:</label>

  <input type="text" id="nick" name="nick"><br>

  <input type="submit">

</form>

 

 

autocomplete 정의

 

자동 완성 여부 지정.

 


 

1. 

  • autocomplete 속성 사용 가능 태그: <form>, <input>
  • input 중 autocomplete 지원 타입: text, search, url, tel, email, password, datepickers, range, color

 

2.

  • autocomplete 속성값을 on으로 설정 시, 브라우저는 사용자가 입력 제출한 값을 기억해두었다가 이전 입력값을 옵션으로 제공함.
  • <form>과 <input>에 autocomlete 속성의 속성값 다를 시, <input> 설정값이 우선함.

 

3.

최신 브라우저 모두 지원.

※ 일부 브라우저 경우, 해당 브라우저 설정에서 사용 가능 설정 필요.

 

 

autocomplete 구문

 

  • <form autocomplete="on|off">
  • <input autocomplete="on|off">

 


[속성값]

 

on|off

자동완성 사용 여부 지정.

  • on - 자동완성 사용 O (기본값)
  • off - 자동완성 사용 X

 

PS. 로그인 정보 (ID/PASSWORD) 입력받을 때 아래 속성값 사용 권장.

  • <input type="text" id="mb_id" name="mb_id" required class="input" placeholder="아이디" autocomplete="username">
  • <input type="password" name="mb_password" id="mb_password" required class="input" placeholder="패스워드" autocomplete="current-password">

 

 

autocomplete 예제 - <form>과 <input> 속성값 다른 경우

※ form과 input의 autocomplete 속성값 다를 시,, input이 우선함.

 

<form action="/action_page.php" method="get" autocomplete="on">

  <label for="name">이름:</label>

  <input type="text" id="name" name="name"><br>

  <label for="nick">별명:</label>

  <input type="text" id="nick" name="nick" autocomplete="off"><br>

  <input type="submit">

</form>

 



분류 제목
formatting HTML - <rb> 태그 ★ - 상단주석 붙일 기본글자 (= rb태그 = 알비태그)
image HTML - <figcaption> 태그 - 독립콘텐츠제목 (= figcaption태그 = 피그캡션태그) (…
media HTML - <track> 태그 - 미디어트랙정보 (= track태그 = 트랙태그)</tr>
attribute HTML - size 속성 ★ - (INPUT 입력창크기 / SELECT 기본노출옵션개수) 지정 (= siz…
basic HTML - <hgroup> 태그 - <h1>~<h6> 제목 묶기 (= 제목그룹 = hgroup태그 = 에이…
formatting HTML - <rt> 태그 ★ - 글자 상단 주석 내용 (= rt태그 = 알티태그)
formatting HTML - <rp> 태그 - 글자 상단 주석 안 먹힐 때 보여줄 내용 (= rp태그 = 알피태그)
formatting HTML - <bdi> 태그 - 글자 양방향 인식 (= 글자방향 = bdi태그 = 브디태그)
attribute HTML - download 속성 - 파일 다운로드 지정 (= download속성 = 다운로드속성) ※ 다운…
style HTML - <article> 태그 ★ - 자족적인 독립콘텐츠 (= 아티클태그 = article태그. IE9…
api HTML5 - Web Storage - 웹저장소 (= 웹스토리지) (IE8 이상) ※ 마우스 클릭횟수 점검
image HTML - <figure> 태그 - 독립콘텐츠표시 (= figure태그 = 피겨태그)
formatting HTML - <time> 태그 - 브라우저 인식 가능 날짜시간 지정 (= time태그 = 타임태그, IE9)
formatting HTML - <meter> 태그 - 게이지바 (= meter태그 = 미터태그)
intro HTML - 구형브라우저에서 HTML5 사용 (+ HTML요소생성법)
list HTML - <dt> 태그 ★ - 설명리스트의 설명항목 (= dt태그 = 디티태그) ※ (정의리스트/데이터리…
formatting HTML - <mark> 태그 - 형광펜칠하기 (= mark태그 = 마크태그) (HTML5추가, IE9 이상…
style HTML - <section> 태그 ★ - 연관된 문서단락 (= section태그 = 섹션태그, IE9)
api HTML5 - Geolocation - 사용자위치 (= 사용자 지리위치 = 지오로케이션)
formatting HTML - <samp> 태그 - 프로그램산출예제. (= 샘프태그 = 샘플태그 = samp태그)
11/18
목록
찾아주셔서 감사합니다. Since 2012