单击提交后,我的表格正在转移到PHP中的后端页面
我要单击提交按钮,我的表格正在提交。我只是想提交详细信息,但不要访问已提交数据的后端页面或弹出窗口。
<form action="functionality\app_details.php" method="post">
<!-- Name -->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Name</span>
</div>
<input type="text" name="name" class="form-control" id="inputName" placeholder="Enter name">
</div>
<!-- Parent's name -->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Parent's Name</span>
</div>
<input type="text" name="Fname" id="inputFname" class="form-control" placeholder="Enter Father's Name">
<input type="text" name="Mname" id="inputMname" class="form-control" placeholder="Enter Mother's Name">
</div>
<button type="submit" class="btn btn-outline-danger">submit</button>
</form>
</div>
I am clicking on Submit button my form is getting submitted. I just wanted to submit the details, but not to visit the backend page or popup in it that the data have been submitted.
<form action="functionality\app_details.php" method="post">
<!-- Name -->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Name</span>
</div>
<input type="text" name="name" class="form-control" id="inputName" placeholder="Enter name">
</div>
<!-- Parent's name -->
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Parent's Name</span>
</div>
<input type="text" name="Fname" id="inputFname" class="form-control" placeholder="Enter Father's Name">
<input type="text" name="Mname" id="inputMname" class="form-control" placeholder="Enter Mother's Name">
</div>
<button type="submit" class="btn btn-outline-danger">submit</button>
</form>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您只想提交,什么也不会发生。只需将动作留空,这样就不会去任何地方。
如果您希望该页面不刷新,也可以这样做:
if you want to just submit it and nothing happen. just leave the action empty so it won't go anywhere.
you can also do this if you want the page not to refresh:
数据将发送到您在操作标签中放置的页面。
如果要将数据发送到同一页面
或使用AJAX。
The data is sent to the page you put in action tag..
If you want to send the data to the same page
or use Ajax.