gpt4 book ai didi

javascript - 将模态表单重定向到我的 php 脚本

转载 作者:行者123 更新时间:2023-12-02 23:56:49 25 4
gpt4 key购买 nike

我正在尝试将模态表单重定向到我的 php 脚本,我使用了操作,但由于某种原因按钮只是单击并停止。

<form action="action.php" method="post" role="form" target="action.php">

<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input class="form-control" id="exampleInputEmail1" placeholder="Enter email" type="email" />
</div>

<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input class="form-control" id="exampleInputPassword1" placeholder="Password" type="password" />
</div>

<!-- Form submit button -->
<button class="btn btn-primary" data-target="action.php" data-toggle="button" type="submit">Submit</button>

</form>

</div> <!-- opened somewhere else -->
</div> <!-- opened somewhere else -->

<p>
<!-- Opens the modal -->
<button class="btn btn-light" data-target="#surveymodal" data-toggle="modal" type="button">Submit</button>

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/popper.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</p>

</body>
</html>

最佳答案

您的提交按钮类型似乎不正确:

<p><button class="btn btn-light" data-target="#surveymodal" data-toggle="modal" type="submit">Submit</button><script src="assets/js/jquery.min.js"></script><script src="assets/js/popper.js"></script><script src="bootstrap/js/bootstrap.min.js"></script></p>

修复上述问题。

关于javascript - 将模态表单重定向到我的 php 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55342364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com