首页 > 解决方案 > python脚本,输出重定向信号以将浏览器指向目标登录页面

问题描述

我将 html 表单发布到 python 脚本。但是,有没有办法执行返回重定向(“/thanks.html”),这将允许 python 脚本运行,并将用户重定向到另一个 URL。正在发布的 python 脚本也将继续发布到另一个 python 脚本。我试过ajax和javascript。我不能既发布数据又重定向用户。

标签: pythonhttpredirect

解决方案


尝试返回这个 html:

<html>
<head>
<script>
window.location="/thanks.html" #or whatever the url is
</script>
</head>
<html>

推荐阅读