Html 为什么我的输入(type=text)会在URL中自动显示#

Html 为什么我的输入(type=text)会在URL中自动显示#,html,bootstrap-4,Html,Bootstrap 4,我有以下代码: <div class="container text-center"> <h1 class="display-3">What's the weather</h1> <p class="lead"><strong>Enter the name of a city:</strong></p> <form> <input typ

我有以下代码:

<div class="container text-center">
          <h1 class="display-3">What's the weather</h1>
          <p class="lead"><strong>Enter the name of a city:</strong></p>
        <form>

<input type="text" placeholder="E.g. Cape Town, London" name="city" id="city" class="form-control" value="">

          <p class="lead">
            <button type="submit" class="btn btn-primary btn-lg" id="button">Submit</button>
          </p>
        </form>
    </div>

天气怎么样

输入城市名称:

提交

每当我单击“提交”按钮时,我都会得到值,然后是“#”。我不知道它是从哪里来的。它显示在URL中(即GET变量)。我正在使用引导。我怎样才能摆脱“#”呢

usu method=”“action=”“。方法POST或GET

<form method="GET" action="">


尝试给出表单操作和方法属性,如果不指定表单操作,则默认端点为#。谢谢,它起作用了。不过,我必须先清除变量