gpt4 book ai didi

html - 一个 HTML 上的多个重定向

转载 作者:行者123 更新时间:2023-11-28 01:09:01 25 4
gpt4 key购买 nike

我想创建一个在按下时重定向到多个页面的页面。

我写了下面的代码来尝试这样做:

<html>
<head>
<meta http-equiv="refresh" content="0; url=http://www.example.com/a" />
<meta http-equiv="refresh" content="0; url=http://www.example.com/b" />
<meta http-equiv="refresh" content="0; url=http://www.example.com/c" />
</head>
</html>

在 Web 服务器日志上,我看到请求只发送到“c”。

这是为什么呢?以及如何创建具有多个重定向的 HTML 页面?

最佳答案

您将不可避免地需要使用 javascript。

<script>
function redirect(){
windows.open("http://www.example.com/a")
windwos.open("http://www.example.com/b")
windwos.open("http://www.example.com/c")
}
</script>

<body onload="redirect()">

没有测试,但应该足够了

关于html - 一个 HTML 上的多个重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38481451/

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