本课内容为:在FOF服务端如何拿到网页通过POST提交的表单数据
1. 准备表单页面
<h1>会员注册</h1>
<form action="abc" method="post">
姓名:<input type="text" name="username">
<br><br>
密码:<input type="password" name="password">
<br><br>
性别:
<input type="radio" name="sex" value="nan">男
<input type="radio" name="sex" value="nv">女
<br><br>
爱好:
<input type="checkbox" name="hobby" value="html">html
<input type="checkbox" name="hobby" value="css">css
<input type="checkbox" name="hobby" javascript="html">javascript
<br><br><br>
<input type="submit" value="注册" style="width: 200px; height: 30px;">
注:
点击提交后,表单数据会以:name值=value值&name值=value值&name值=value值..... 的形式组装成字符串发送到服务端
即:username=111&password=222&sex=nan&hobby=html 这种形式
输入框的value值为:客户输入的内容
选择框的value值为:用户勾选的选项对应的value值
action的值为数据提交到的url
2. 在客户端拿到提交的数据