Stack/HTML & CSS

input 태그 활용(hidden 사용하기)

Emmababy 2021. 1. 6. 20:11
728x90

 

[ input태

그 hidden사용예시 ]

 

 

<로그인화면> 

로그인정보가 틀릴경우 안내메시지를 input type="hidden"  ->  input type="text"로 변경

 

<해당코드>

type="hidden" 

login.jsp

 

 

 

  • button에 onclick함수(showSwal()) 연결
  • ajax success 부분에 제이쿼리 적용
  • attr : type을 hidden -> text로 변경하도록 적용
login.jsp script부분

 

 

 

<참고 : input type종류>

 

 

 

 

[출처] 

jun.hansung.ac.kr/CWP/htmls/HTML%20Input%20Types.html

728x90