TIL #06 HTML button, hidden
button
<form action="http://localhost/form.php">
<input type="text">
<input type="submit" value="전송"> 제출할 때 사용하는 버튼 value값을 사용해 내용을 변경한다.
<input type="button" value="버튼" onclick="alert('hello world')">
전송버튼은 페이지가 바뀌지만 button은 바뀌지 않는다. 보통 자바스크립트를 사용할때 쓴다.
<input type="reset">
재설정하는 버튼이다. 사용자가 정보를 입력한 후 reset버튼을 누르면 모든 정보가 초기화 된다.
</form>
hidden
ui가 필요없거나 몰래 서버쪽으로 데이터를 전송해야 할 경우 hidden field
라는것을 사용한다.
<form action="http://localhost/hidden.php">
<input type="text" name="id">
<input type="hidden" name="hide" value="egoing">
<input type="submit">
</form>
제출 버튼을 누르게되면 id 라는 이름의 값뿐만아니라 사용자는 보이지 않지만 hide라는 이름의 egoing이라는 값이 같이 ui로 전달된다.
Author And Source
이 문제에 관하여(TIL #06 HTML button, hidden), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@zhd5379/TIL-05-HTML-button-hidden저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)