Progo
Progo

Reputation: 3490

How can I access a folder or file in parent folder JavaScript?

I have a web page(index.hmtl), which has links to go to pages in the page folder. How can I link back the main page from the a webpage in the page folder?

File tree:

/www
    index.html
    /pages
        pageA.html
        pageB.hmtl

Thanks.

Upvotes: 2

Views: 10601

Answers (1)

Matt Way
Matt Way

Reputation: 33171

You can use ../ to access a relative parent folder.

Upvotes: 9

Related Questions