HTML 按钮:如何链接文件夹外的文件? [英] HTML Button: How to link a file outside a folder?

查看:33
本文介绍了HTML 按钮:如何链接文件夹外的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查找当前文件夹之外的文件夹路径.我正在使用按钮重定向到另一个页面.但是我要重定向的页面在文件夹之外.

I'm trying to find the path of the folder outside my current folder. I'm using a button to redirect to another page. But the page I want to redirect is outside the folder.

<input type="button" value="Back to Main Menu" onClick="location.href='./guestStart.php'" >

文件guestStart.php"在当前页面的文件夹之外.

The file "guestStart.php" is outside the folder of the current page.

有人知道吗?谢谢大家的帮助!

Does anybody know how? Thanks for the help guys!

推荐答案

是的,您可以根据需要多次键入 ../来向后移动,然后指定您的文件即:如果您的 index.php/html 在 project1/date1/x1 中,而您希望它链接的文件在 project1/date3/x4 中,则需要键入

yes you can get move backward by typing ../ as many time as you need to then specify your file ie: if your index.php/html is in project1/date1/x1 and the file you want it to link is in project1/date3/x4 you will need to type

<a href="../../date3/x4/guestStart.php">link</a>

这篇关于HTML 按钮:如何链接文件夹外的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆