html - 如何将主 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>
解决方案
您在C:\\Users\\computer\\Pictures\\home.html
. 你应该使用C:/Users/computer/Pictures/home.html
. HTML 算作C:\\...
2 个斜杠,而不是一个。此外,HTML 使用正斜杠 ( /
) 而不是反斜杠 ( \
)。
推荐阅读
- tensorflow - 张量对象没有属性 keras_shape
- azure-devops - 从 Azure DevOps REST API 获取策略配置时无法识别必需和可选审阅者
- powershell - PowerShell 未打印到控制台
- c# - C#/WPF/Caliburn.Micro - Combobox ItemsTemplate 绑定到匿名类型属性
- ocr - Tesseract 即使在普通图像上也会产生可怕的结果
- vue.js - Vue 组件显示在表格之外
- php - 谷歌sql没有插入
- javascript - 使用javascript将日期时间字段(在json对象中)转换为毫秒
- dialogflow-es - 当要求向谷歌助手启动我的应用程序时,我收到一条关于谷歌共享数据阻止启动应用程序的消息
- c - 为什么 int 可以容纳 10 位数字但不能处理另一个整数的 9 位数字?