【发布时间】:2015-10-18 21:27:19
【问题描述】:
我正在启动一个用Javascript 编写的小脚本,从HTML、text_script.html 加载一个简单的图像:
<body>
<img src="firstcar.gif" name="slide" width="100" height="56" />
<script>
Var image = [];
image[0]=new Image();
image[0].src="firstcar.gif“;
image[1]=new Image()
Image[1].src="secondcar.gif“;
var step=0;
function slideit(){
document.images.slide=image[step] ;
if (step<image.length) step++ else step=0;
setTimeout("slideit()",2500)
}
slideit();
</script>
</body>
这是我的 Documents 文件夹的结构,其中包含脚本和 3 张图像,firstcar.git、secondcar.gif 和 thirdcar.gif:
问题是,当我在浏览器上执行代码时,它返回此错误,`Failed to load resource: the server respond with a status of 403 (forbidden):
现在,我通过以下方式停止并重新启动服务器进行了检查:
sudo apachectl start 和 sudo apachectl stop 我还仔细检查了文件的路径,但这些方法都不起作用。
我怀疑这是权限问题?如何解决?
【问题讨论】:
标签: javascript apache syntax-error embedded-resource http-status-code-403