首页 > Web开发 > 详细

HTML 问题 : GET or POST 模式FORM 都不传参数.

时间:2019-03-03 14:38:10      阅读:202      评论:0      收藏:0      [点我收藏+]

 GET  模式  FORM 都不传参数.

技术分享图片

 

 

 1 默认 查询.

2.传参  get 模式    

 3.处理

3-1  search = ‘‘  时 : pass

3-2 get = string  时 是名称..查询  name =

 3-3  get = 数量时  可能是 qq 或 phone 

4 返回 htppresponse



_____________
urls
views
html模板中的 {% block %}

<div>
<form class="navbar-form navbar-left"  role="search"  action="" method="get">
  <!--<div class="form-group">-->
    <div class="form-group">
   <input type="text" class="form-control"   name ="search"   placeholder="姓名 or 电话 or QQ">
  </div>
  <button type="submit" class="btn btn-default">查询</button>
  <a class="btn btn-primary" role="button" href="{% url ‘teatcher:students‘ %}">添加</a>
  <a class="btn btn-primary" role="button" href="{% url ‘teatcher:students‘ %}">重置</a>
</form>
 </div>

曾经 犯了个错,给 type = submit 的查询 按键加了url 完了... 怎么也传不参数..

HTML 问题 : GET or POST 模式FORM 都不传参数.

原文:https://www.cnblogs.com/crave/p/10465041.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!