[HTML] 검색, 로그인 폼 구현하기

세상을 바꾸는 개발자·2023년 3월 16일
0

<h1>네이버 검색</h1>
<!-- method="GET" 은 생략가능 -->
<!-- target="_blank" 새창 열기 -->
<form method="GET" action="https://search.naver.com/search.naver" target="_blank">
  <input type="text" name="query" placeholder="검색어">
  <button type="submit">검색</button>
</form>

<h1>다음 검색</h1>

<form method="GET" action="https://search.naver.com/search.naver" target="_blank">
  <input type="text" name="q" placeholder="검색어">
  <button type="submit">검색</button>
</form>

<h1>basic1 로그인</h1>

<form method="GET" action="http://localhost:8080/member/login" target="_blank">
  <input type="text" name="username" placeholder="아이디">
  <input type="password" name="password" placeholder="비밀번호">
  <button type="submit">로그인</button>
</form>



form을 편지지에 비유

  • method - 배송 방법
  • action - 받는 사람
  • form 안의 요소 - 편지 내용
profile
초심 잃지 않기

0개의 댓글