表单HTML单击后不发送



我使用表单html我的问题点击提交后在我的兄弟中什么都不发送

<form method="get" id="booking-form" role="form" action="">
<div class="col-md-3 col-sm-6">
<i class="fa fa-map-marker rechercheIndex"></i>
<label class="sr-only" >Recherche</label>
<input type="text" class="form-control" placeholder="Ville">
</div>
<div class="col-md-2 col-sm-4">
<input type="submit" class="btn btn-primary btn-block" >
</div>
</form>

点击按钮后不发送

我在表格中检测到的返回值

我找到了解决方案。只需在我的输入name中添加name=";城市;

<label for="city">Enter city: </label>
<input type="text" class="form-control" placeholder="Ville" name="ville">

将Action Attribute设置为特定的Action Page您必须使用PHP或其他服务器端语言才能与表单交互

Index.php

<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
</body>
</html>

欢迎使用.php

<html>
<body>
Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?>
</body>
</html>

在第一行中,我们需要给出表单获取收集的路径

例如:-

在这种形式中/action_page.php";