<i id='VFGBT'><tr id='VFGBT'><dt id='VFGBT'><q id='VFGBT'><span id='VFGBT'><b id='VFGBT'><form id='VFGBT'><ins id='VFGBT'></ins><ul id='VFGBT'></ul><sub id='VFGBT'></sub></form><legend id='VFGBT'></legend><bdo id='VFGBT'><pre id='VFGBT'><center id='VFGBT'></center></pre></bdo></b><th id='VFGBT'></th></span></q></dt></tr></i><div id='VFGBT'><tfoot id='VFGBT'></tfoot><dl id='VFGBT'><fieldset id='VFGBT'></fieldset></dl></div>

      <small id='VFGBT'></small><noframes id='VFGBT'>

      • <bdo id='VFGBT'></bdo><ul id='VFGBT'></ul>
      <legend id='VFGBT'><style id='VFGBT'><dir id='VFGBT'><q id='VFGBT'></q></dir></style></legend>
      <tfoot id='VFGBT'></tfoot>

      1. 表单提交 URL 格式

        Form Submit URL Formatting(表单提交 URL 格式)
        • <bdo id='KndS0'></bdo><ul id='KndS0'></ul>
        • <legend id='KndS0'><style id='KndS0'><dir id='KndS0'><q id='KndS0'></q></dir></style></legend>
        • <small id='KndS0'></small><noframes id='KndS0'>

        • <tfoot id='KndS0'></tfoot>
            • <i id='KndS0'><tr id='KndS0'><dt id='KndS0'><q id='KndS0'><span id='KndS0'><b id='KndS0'><form id='KndS0'><ins id='KndS0'></ins><ul id='KndS0'></ul><sub id='KndS0'></sub></form><legend id='KndS0'></legend><bdo id='KndS0'><pre id='KndS0'><center id='KndS0'></center></pre></bdo></b><th id='KndS0'></th></span></q></dt></tr></i><div id='KndS0'><tfoot id='KndS0'></tfoot><dl id='KndS0'><fieldset id='KndS0'></fieldset></dl></div>

                    <tbody id='KndS0'></tbody>

                  本文介绍了表单提交 URL 格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个表单,提交时会转到 URLsignup.php?username=xx",其中 xx 是输入字段.相反,我想知道是否可以将它转到以下网址signup/xx",其中 xx 取自输入字段.

                  I have a form which when submitted goes to the url "signup.php?username=xx" where xx is an input field. Instead of this I was wondering if I could get it to go to the following url "signup/xx" where xx is taken from the input field.

                  推荐答案

                  为此,您需要使用 Javascript 和某种类型的 .htaccess.但是为什么不使用 POST 而不是 GET 呢?

                  You need to use Javascript and some type of .htaccess for that. But why don't you use POST instead of GET?

                  我不想在我的历史记录中出现 singup?username=sawny&password=1234.

                  I don't want singup?username=sawny&password=1234 in my history.

                  我做过这样的事情:

                  $(document).ready(function() {
                      $("submit[name='foo']").live('submit', function() {
                  
                          var usr = $("form input[name='user']").val();
                          $("form input[name='user']").remove(); //Else it will be singup/usr?user=
                  
                          $("form[name='bar']").attr("action", "singup/"+ usr);
                      });
                  });
                  

                  然后在 .htaccess 文件中发布正则表达式 @zero.

                  and then the regexp @zero posted in a .htaccess file.

                  这篇关于表单提交 URL 格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                  <i id='ZRel6'><tr id='ZRel6'><dt id='ZRel6'><q id='ZRel6'><span id='ZRel6'><b id='ZRel6'><form id='ZRel6'><ins id='ZRel6'></ins><ul id='ZRel6'></ul><sub id='ZRel6'></sub></form><legend id='ZRel6'></legend><bdo id='ZRel6'><pre id='ZRel6'><center id='ZRel6'></center></pre></bdo></b><th id='ZRel6'></th></span></q></dt></tr></i><div id='ZRel6'><tfoot id='ZRel6'></tfoot><dl id='ZRel6'><fieldset id='ZRel6'></fieldset></dl></div>

                          <tbody id='ZRel6'></tbody>
                        <legend id='ZRel6'><style id='ZRel6'><dir id='ZRel6'><q id='ZRel6'></q></dir></style></legend>

                        <small id='ZRel6'></small><noframes id='ZRel6'>

                          • <bdo id='ZRel6'></bdo><ul id='ZRel6'></ul>
                          • <tfoot id='ZRel6'></tfoot>