【问题标题】:Redirection to the web page not happening重定向到网页没有发生
【发布时间】:2017-09-04 18:24:38
【问题描述】:

我一直在尝试从节点服务器的主页重定向另一个网页。 链接没有发生重定向。/idea.html 也存在要链接的相关网页(HTML 文件)idea.html。 各位大神能帮我看看代码有没有错误或者有什么特殊的功能需要添加吗

<!DOCTYPE html>
<html lang="en">
<head>
<div>
<a href="https://www.sports_tournament/apple.com">apple</a>
</div>
</body>
</html>

idea.html

<!DOCTYPE html>
<html lang="en">
<head>
 <title>thenewboston></title>
 <link rel="stylesheet" href="CSS/style.css" />
</head>
<body>
<link rel="Registration" href="C:/Users/web/Mongodb/home.html" />
</body>
</html>

【问题讨论】:

    标签: javascript html css node.js reactjs


    【解决方案1】:

    idea.html 与 index.html 位于同一文件夹时有效。不需要任何功能。您应该在idea.html 中添加一些内容,看看是否有效。

    【讨论】:

    • ...感谢您的回复...这两个 HTML 文件都在同一个文件夹中。有没有其他方法可以解决这个问题
    【解决方案2】:

    在同一页面上为什么你必须重定向我认为你必须在那里使用 href="#"

    【讨论】:

    • 问题明确指出“我一直在尝试从主页重定向到其他网页”。还有两个 HTML 文件,所以我猜它们是两个单独的页面。
    猜你喜欢
    • 1970-01-01
    • 2021-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多