使用带完整操作路径的GET方法提交HTML表单 [英] Submit HTML form with GET method with full action path

查看:245
本文介绍了使用带完整操作路径的GET方法提交HTML表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用方法GET和动作index.php?id = 3提交表单。问题是它跳转到指定的url,但它切断了?id = 3部分。我需要这样才能识别用户。关于如何提交整个网址的任何想法?我不想改变这种方法,因为设计比我在这里告诉你的要复杂得多。这是一个简单的版本。

I am trying to submit a form with method GET and action "index.php?id=3". The problem is that it jumps to the url specified but it cuts off "?id=3" part. I need that so I can identify an user. Any ideas on how I could submit the whole url ? I don't want to change this method, by design is much complex than I told you here. It's a simple version.

任何想法?谢谢。

推荐答案

添加隐藏字段(< input type =hiddenname =id value =3/> ),并使用 index.php 作为动作。

Add a hidden field (<input type="hidden" name="id" value="3" />) in the form and use just index.php as the action.

这篇关于使用带完整操作路径的GET方法提交HTML表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆