javascript - 重定向不起作用/警报无显示

标签 javascript php jquery

似乎无法完成这项工作。我想在提交后返回到表单。但它只是显示

**Object not found!**

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

**Error 404**

localhost
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.23

并且警报也不会弹出。 或者因为有错误而不会弹出?

我的PHP

if (mysqli_query($con,$sql))
    {
        ?><script>
            alert('Saved Successfully!');
            window.location = ".../cnc/makerForm.php";
        </script><?php
    }

我的html

<div class="w3-border">
    <h6 class = "w3-grey trbl-padding-5 trbl-margin">Maker</h6>
    <a class="w3-btn-floating w3-pale-yellow" onclick="return toggleMakerBox('iframe_makerForm')">+</a>
    <iframe height="400px" width="100%" src="makerForm.php" style="display:none;" name="iframe_makerForm" id="iframe_makerForm"></iframe>
</div>

最佳答案

谢谢你们。 我现在知道我的代码出了什么问题。我表单中的文件拼写错误。

关于javascript - 重定向不起作用/警报无显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40084303/

相关文章:

javascript - 如何使用 JavaScript 观察 an 元素的 scrollWidth 属性的变化?

php_oci8 未在 wamp 服务器 2.0 上加载?

php - 获取 Flickr 集

php - 联系表格 7 设置字段值与获取请求

javascript - 获取 SVG 线、矩形、多边形和圆形标签的长度

javascript - cloneNode 方法不起作用

javascript - Sequelize Query FindAll 不过滤

javascript - 在客户端还是服务器端生成 UI?

jquery - 如何使用 jQuery 在单击输入框时使其他 div 变暗?

jquery:有没有办法从主机目录读取所有文件?