- HTML <input> readonly 속성
- Input readonly 속성
- input text 변경불가
- input text 읽기전용
1 기초 예제 (속성)[ | ]
html
Copy
<!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 자바스크립트로 제어[ | ]
html
Copy
<!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 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.