HTML

HTML form태그

브레드jung 2021. 4. 8. 18:58

form 태그 문서양식 <input> 
Name,= 폼을 식별하기위한 이를
Id = 주민번호
class= 직업
action = 폼을 전송할 서버쪽 스크립트파일지정
method = 폼을 서버에 전송할 http 메소드를 정함 git또는 post
target = action에서 지정한 스크립트 파일을 현재창이아닌 다른위치에 열도록 지정
Accept-charset = 폼 전송에 사용할 문자 인코딩을 지정합니다.
<textarea> 태그

 

<html>

<head>

<title>form</title>

</head>

<body>

<form method="POST" action="result.html">

 

아이디:<input type="text" maxlength="5" name="name" value="정지창"><br/>

패스워드:<input type="password" name="pwd" value="11111"><br/>

전화번호:

<select>

<option>010</option>

<option>02</option>

<option>031</option>

</select>

<input type="number" name="phone" maxlength="8" value="11111111"><br/>

남자:<input type="radio" name="sex" value="male" checked="checked">

여자:<input type="radio" name="sex" value="female">

<br/>

취미<br/>

개발<input type="checkbox" name="hobby" checked="checked"><br/>

게임<input type="checkbox" name="hobby" checked="checked"><br/>

축구<input type="checkbox" name="hobby"><br/>

<br/>

자기소개:

<textarea>아무거나</textarea><br/>

프로필이미지 <input type="file"> <br/>

<input type="submit" value="전송">

</form>

</body>

</html>

반응형