Programming/Html

[Html] input tag μ΅œμ†Œκ°’(min)κ³Ό μ΅œλŒ€κ°’(max) μ„€μ •ν•˜λŠ” 방법

yuri lee 2022. 10. 7. 22:38
λ°˜μ‘ν˜•

Intro

input tag μ—μ„œ μ΅œμ†Œκ°’κ³Ό μ΅œλŒ€κ°’μ„ μ„€μ •ν•˜λŠ” 방법에 λŒ€ν•΄ μ•Œμ•„λ³΄λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€. 

Syntax

<input min="숫자|λ‚ μ§œ" max="숫자|λ‚ μ§œ">
  • 숫자 (number) : μ΅œμ†Ÿκ°’ ν˜Ήμ€ μ΅œλŒ€κ°’μ„ λͺ…μ‹œν•¨
  • λ‚ μ§œ (date) : μ΅œμ†Ÿκ°’ ν˜Ήμ€ μ΅œλŒ€κ°’μ„ λͺ…μ‹œν•¨

Example

<input type="date" name="bday" min="2022-01-01" max="2022-12-31" />

http://www.tcpschool.com/html-tag-attrs/input-min

λ°˜μ‘ν˜•