首页 > 解决方案 > 如何将主 html 页面访问到另一个 html 页面?

问题描述

我有主 HTML 页面,另一个 HTML 页面位于 C:\Users\computer\Pictures 中。当我运行主 HTML 页面并单击指向另一个 HTML 页面的链接时,它显示“找不到文件。它可能已被移动或删除。ERR_FILE_NOT_FOUND。”

自从我将 HTML 文件保存在 C:\Users\computer\Pictures 中以来,我没有移动和删除这些文件。

这是HTML代码

<div id="Border" class="">

    <div id="Topic_List" class="creature">
        <ul id="ListName" class="">
            <li><a href="C:\\Users\\computer\\Pictures\\home.html"> home </a></li>
            <li><a href="C:\\Users\\computer\\Pictures\\life.html">Life</a></li>
            <li><a href="C:\\Users\\computer\\Pictures\\interest.html"> Interest </a></li>
        </ul>

    </div>


</div>

这是另一个 HTML 页面

<style>
 #Content{margin:5px auto;padding:0;width:600px;height:auto;border:1px solid #666;background-color:#f1f1f1}
 #col{margin:5px;padding:0;width:590px;height:auto;}
</style>
<body>

<div id="Content" class="">
<div id="col" class="">
<p><font size="5" >
    Hello, Welcome to my home page
</font>
</p>
<h1  align="center"> Activities </h1>
<p><font size="5" > 

    <ul id="ActivitiesList" class="">
    <li> Soccer </li>
    <li>Football</li>
    </ul>

</font></p>


<p>


</div>
</div>



标签: html

解决方案


您在C:\\Users\\computer\\Pictures\\home.html. 你应该使用C:/Users/computer/Pictures/home.html. HTML 算作C:\\...2 个斜杠,而不是一个。此外,HTML 使用正斜杠 ( /) 而不是反斜杠 ( \)。


推荐阅读