当提交表单时,发送表单数据到名为 “demo_form.html” 的文件(处理输入):

<form action=”demo_form.html” method=”get”>
  First name: <input type=”text” name=”fname”><br>
  Last name: <input type=”text” name=”lname”><br>
  <input type=”submit” value=”提交”>
</form>

 

<!DOCTYPE html>
<html>
<head> 
<meta charset=”utf-8″> 
<title>菜鸟教程(runoob.com)</title> 
</head>
<body>

<form action=”demo-form.php”>
First name: <input type=”text” name=”FirstName” value=”Mickey”><br>
Last name: <input type=”text” name=”LastName” value=”Mouse”><br>
<input type=”submit” value=”提交”>
</form>

<p>点击”提交”按钮,表单数据将被发送到服务器上的“demo-form.php”。</p>

</body>
</html>

版权声明:本文为king911原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/king911/p/10470876.html