您好,欢迎访问一九零五行业门户网

HTML表单传值示例通过get方式传递

google.html界面如图
代码如图:(比较简单,就是一个input输入框和input提交按钮,注意type为submit,而不是button)
<html>  <head>  <title>winbobo</title>  </head>  <body>  <div align="center">  <form action="google.php" method="get">  <input name="q" type="text"/>  </br>  <input name="btnsearch" type="submit" value="search" />  </form>  </div>  </body>  </html>
google.php的代码如图:($_get用于获取表单通过get方式传递的数据; $_post用于获取表单通过post方式传递的数据)
<?php print "<pre>;  print_r($_get);  print </pre>;  ?>
运行结果如图:
更多html表单传值示例通过get方式传递。
其它类似信息

推荐信息