<input type=’text’ style=’display:none’>
타입은 전송이 될까? 안될까? 표준은 전송 되어야하는걸로 나와있다.
그러나 브라우저마다 틀리다.
전송하기싫은 input이 있다면 disabled 속성을 넣어주자.
disabled 아니면 기본적으로 다 전송되어야 합니다
참고자료 :
17.13.2 Successful controls
A successful control is “valid” for submission. Every successful control has its control name paired with its current value as part of the submitted form data set. A successful control must be defined within a FORM element and must have acontrol name.
However:
- Controls that are disabled cannot be successful.
- If a form contains more than one submit button, only the activated submit button is successful.
- All “on” checkboxes may be successful.
- For radio buttons that share the same value of the name attribute, only the “on” radio button may be successful.
- For menus, the control name is provided by a SELECT element and values are provided by OPTION elements. Only selected options may be successful. When no options are selected, the control is not successful and neither the name nor any values are submitted to the server when the form is submitted.
- The current value of a file select is a list of one or more file names. Upon submission of the form, the contents of each file are submitted with the rest of the form data. The file contents are packaged according to the form’s content type.
- The current value of an object control is determined by the object’s implementation.
If a control doesn’t have a current value when the form is submitted, user agents are not required to treat it as a successful control.
Furthermore, user agents should not consider the following controls successful:
- Reset buttons.
- OBJECT elements whose declare attribute has been set.
Hidden controls and controls that are not rendered because of style sheet settings may still be successful. For example:
<FORM action="..." method="post">
<P>
<INPUT type="password" style="display:none"
name="invisible-password"
value="mypassword">
</FORM>
will still cause a value to be paired with the name “invisible-password” and submitted with the form.
참조 : http://phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=75224
