본문 바로가기
대학원 공부/programming language

HTML : form

by 월곡동로봇팔 2020. 5. 10.

form

form은 어떤 형식에 따라 제출할 때 보통 쓰인다.

Type Description
<input type="text"> Defines a single-line text input field
<input type="radio"> Defines a radio button (for selecting one of many choices)
<input type="submit"> Defines a submit button (for submitting the form)
  • text는 text를 입력하는 창
  • radio는 클릭하는 창
  • submit은 제출하는 창, --> js와 연결지을 수 있다.
<!DOCTYPE html>
<html>
<body>

<h2>Radio Buttons</h2>

<form>
  <input type="text" id="male" name="gender" value="male">
  <label for="male">Male</label><br>
  <input type="radio" id="female" name="gender" value="female">
  <label for="female">Female</label><br>
  <label for="other">submit</label><br>
  <input type="submit" id="other" name="gender" value="other">
  
</form> 

</body>
</html>

result

 

form 종류

  • <input type="button">
  • <input type="checkbox">
  • <input type="color">
  • <input type="date">
  • <input type="datetime-local">
  • <input type="email">
  • <input type="file">
  • <input type="hidden">
  • <input type="image">
  • <input type="month">
  • <input type="number">
  • <input type="password">
  • <input type="radio">
  • <input type="range">
  • <input type="reset">
  • <input type="search">
  • <input type="submit">
  • <input type="tel">
  • <input type="text">
  • <input type="time">
  • <input type="url">
  • <input type="week">

https://www.w3schools.com/html/html_form_input_types.asp

 

HTML Input Types

HTML Input Types This chapter describes the different types for the HTML element. HTML Input Types Here are the different input types you can use in HTML: Input Type Text defines a single-line text input field: Example

 

 

www.w3schools.com

 

'대학원 공부 > programming language' 카테고리의 다른 글

HTML : string formatting  (0) 2020.05.10
HTML : HTML Attribute  (0) 2020.05.10
Web : 무료 html template  (0) 2020.05.10
javascript : module화 하기  (0) 2020.05.09
javascript : 객체와 실습코드  (0) 2020.05.09

댓글