스프링
form과 button
메밀국수가생각나
2021. 11. 21. 20:33
<form method="post" action="/board/post">
<button type="submit" name="register">등록</button>
</form>
코드를 짜면서 위와같이 form 안에 button 을 생성하여 사용해보았다.
재밌는 점은 버튼을 클릭하게 되면 button 의 name이 파라미터로 적용되서 url이
/board/post?register 와 같이 된다는 것이다.