Details and issues of form submission

<form action="url地址" method="提交方式" name="表单名称">
	........
	........
	数据内容
	........
	<input type="reset"/>
	<!--重置按钮-->
	<input type="submit"/>
	<!--提交按钮-->
</form>

Question 1: When the
form is submitted, the data is not sent to the server.
There are three situations:
1. The form item does not have a name value. When the form item does not set the name value, this item cannot be submitted to the target url address

<input type="radio" name="sex" value="boy"/>

When the user is checked, the return value is:sex=boy


2. Single selection, multiple selection, drop-down list, all need to add default values, which are convenient to send to the server. When the default value is not set, it will return to the url address "设置的name"=onif the default value is set."设置的name"="返回选中选项的默认值"

<input type="checkbox" value="java" name="hobby"/>java

When the user is checked, the return value is:hobby=java


3. The form item is not in the submitted form tag, that is, the form item in the form is written outside the form



Submission can choose post do not get detailed information on why the election method part of this link

Guess you like

Origin blog.csdn.net/qq_45821251/article/details/108836521