我正在将 html 表单发布到 python 脚本。但是,有没有办法执行 return redirect("/thanks.html") ,这将允许 python 脚本运行,并将用户重定向到另一个 URL。正在发布的 python 脚本也将继续发布到另一个 python 脚本。我尝试了 ajax 和 javascript。我无法同时发布数据和重定向用户。
最佳答案
尝试返回此 html:
<html>
<head>
<script>
window.location="/thanks.html" #or whatever the url is
</script>
</head>
<html>
关于python脚本,输出重定向信号,将浏览器指向目标登陆页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51074876/