HTML input readonly 속성

Jmnote bot (토론 | 기여)님의 2017년 6월 27일 (화) 03:57 판 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
HTML <input> readonly 속성
Input readonly 속성
input text 변경불가
input text 읽기전용

1 기초 예제 (속성)[ | ]

<!DOCTYPE html>
<meta charset='utf-8'>
<form action="form_action.asp">
변경불가 <input type="text" name="country" value="대한민국" readonly="readonly" /><br>
변경가능 <input type="text" name="city" value="서울" />
</form>

2 자바스크립트로 제어[ | ]

<!DOCTYPE html>
<meta charset='utf-8'>
<form name='myform' action="form_action.asp">
변경불가 <input type="text" name="country" value="대한민국" /><br>
변경가능 <input type="text" name="city" value="서울" />
</form>
<script>
myform.country.readOnly = true;
</script>

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}