【发布时间】:2018-08-20 13:11:36
【问题描述】:
这是一件令人困惑的事情。首先查看hierarchy of my folders and etc. 并看到我的图像“cribbage.png”位于图像文件夹下。我正在尝试使用 index.html 中的以下代码访问此图像:`
<!doctype html>
<html lang = "en">
<head>
</head>
<body>
<h1>Hello World! </h1>
<img src= "images/cribbage.png" width= "970" height="224"/>
<div id = "future"></div>
<form id = "form" id = "chat_form">
<input id = "username" type="text">
<input type = "submit" value="Play">
</form>
<script src = "/jquery/dist/jquery.js"></script>
<script src = "/socket.io/socket.io.js">
</body>
</html>
然而,在加载网站时,我得到了 the following 并且图像被损坏的图像图标替换。
这里到底出了什么问题?
【问题讨论】:
-
您的网址指向
localhost/images/yourimagename.jpg,而您的文件夹结构为localhost/crib/images/yourimagename.jpg
标签: html image http-status-code-404 src