HTML表单字符串错误

编程入门 行业动态 更新时间:2024-10-27 19:18:46
本文介绍了HTML表单字符串错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我点击发送请求按钮时,查询字符串?req_flag = 0 从URL中消失我在哪里犯了一个错误?我需要以下URL: localhost / flavourr / send_req.php?req_flag = 0& f_e_mail_add = value

When I click the "Send "Request" button, the query string ?req_flag=0 disappears from the URL. Where am I making a mistake here? I need following URL: localhost/flavourr/send_req.php?req_flag=0&f_e_mail_add=value

<pre> <form method="get" action="send_req.php?req_flag=0"> <input type="text" name="f_e_mail_add" value="Enter email of your friend" onblur='if (this.value == "") {this.value = "Enter email of your friend";}' onfocus='if (this.value == "Enter email of your friend") {this.value = "";}' size="35" /> <input type="submit" value="Send Request" /> </form></pre>

推荐答案

只需添加如下所示的隐藏值并从action属性中删除'?req_flag = 0'。

Just add a hidden value as shown below and remove the '?req_flag=0' from the action attribute.

<form method="get" action="send_req.php"> <input type="text" name="f_e_mail_add" value="Enter email of your friend" size="35" /> <input type="hidden" id="req_flag" name="req_flag" value="0" /> <input type="submit" value="Send Request" /> </form>

更多推荐

HTML表单字符串错误

本文发布于:2023-10-19 19:29:51,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   字符串   错误   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!