哪些标签的哪些值会被提交到服务器呢?
只有Input select textarea 三种类型的标签 有name的value值会被提交
只有这三种标签的value属性的值(select 是选中项的value)才会被提交给服务器。
形式:name=value 键值对的方式提交给服务器。name是给服务器用的。id是给Dom用的。
对于RadiioButton 同name的为一组,选中的RadioButton的value被提交到服务器
当input=submit ,只有被点击的按钮的value才会被提交
要放在form标签内,只有防盗form标签内的标签才可能被提交到服务器。form之外的input等标签会被忽略。
题外话:
<input type="radio" id="man"/><label for="man">man </label> label 标签是为for指定的 id="man"的标签服务的。 当点击man的时候,radio按钮照样有反应能被选中
<input type="text" name="name" value="login"/> 此时,提交到服务器的值就是name=login;