【问题标题】:HTML submit form does not work as expectedHTML 提交表单无法按预期工作
【发布时间】:2019-09-24 06:12:35
【问题描述】:

我最近开始练习 Html。我正在处理没有任何数据的简单提交表单。 这是我的 index.html 代码

    <html> 
    <body>
     <form action="/a.html"> <center><h1>Vignesh</h1> > </center> <BR><br> <input type="submit" value="SUBMIT"> 
    </form> >
     </body> 
    </html>

Here is my a.html code...

    <html>
    <body>
    <h1>
    <b>SUBMITTED<b>
    </h1>
    </body>
    </html>

当我按下提交时,它显示“文件 a.html?未找到”我不知道它添加了“?”最后。如果删除?从链接手动操作。

【问题讨论】:

    标签: web-services web web-applications web-crawler


    【解决方案1】:
    <html>
       <body>
          <form action="/a.html" method="POST">
             <center>
                <h1>Vignesh</h1>
                > 
             </center>
             <BR><br> <input type="submit" value="SUBMIT"> 
          </form>
          >
       </body>
    </html>
    

    添加属性method="POST" 将解决您的问号问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      • 2017-03-12
      • 2021-04-16
      • 2021-10-16
      相关资源
      最近更新 更多