Home  >  Article  >  Web Front-end  >  /、./、/ 的区别_html/css_WEB-ITnose

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

WBOY
WBOYOriginal
2016-06-24 11:24:501153browse

/  代表当前文件所在的根目录(指的是盘符根目录,比如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)

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

 

Statement:
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