码迷,mamicode.com
首页 > Web开发 > 详细

<a>和<button>URL传参时,效果是不同的,为什么呢?

时间:2016-10-04 11:58:30      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

问题描述:

技术分享

按钮是

<form action="xx.jsp?t_id=<%=t_id%>">

  <button type="submit">顶</button>

</form>

<a>标签是

<a href="xx.jsp?t_id=<%=t_id%>">

为什么点击后,后台接收到的数据是不同的。前者是null,后者则可以是我想要传的t_id;

 

<a>和<button>URL传参时,效果是不同的,为什么呢?

标签:

原文地址:http://www.cnblogs.com/zhaoxingjun/p/5927394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!