/、./、/ 的区别_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:24:50
Original
1172 people have browsed it

/  代表当前文件所在的根目录(指的是盘符根目录,比如C盘、D盘);

./ 代表当前文件所在的根目录,如果想读取同一个文件夹下的文件时,也可以不写;

../代表当前文件所在文件的父级文件夹

如下:我想在c文件夹的demo0中分别读取到 jd1 jd2 jd3 jd4这四张图片(根目录:G盘;其中,demo->a和jd1.jpg;a->b和jd2.jpg;b->c和jd3.jpg;c->demo0和jd4.jpg)

效果图有点大,看下控制台吧:

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template