HTML有2種路徑的寫法 絕對路徑和相對路徑

2021-07-25 01:29:46 字數 1266 閱讀 1670

我們現在建乙個原始檔info.html,在info.html裡要引用index.html檔案作為超連結。

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/sites/blabla/index.html

在info.html加入index.html超連結的**應該這樣寫:

index.html

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/sites/index.html

在info.html加入index.html超連結的**應該這樣寫:

index.html

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/index.html

在info.html加入index.html超連結的**應該這樣寫:

index.html

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/sites/wowstory/index.html

在info.html加入index.html超連結的**應該這樣寫:

index.html

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/sites/blabla/html/index.html

在info.html加入index.html超連結的**應該這樣寫:

index.html

假設info.html路徑是:c:/inetpub/wwwroot/sites/blabla/info.html

假設index.html路徑是:c:/inetpub/wwwroot/sites/blabla/html/tutorials/index.html

HTML有2種路徑的寫法 絕對路徑和相對路徑

html相對路徑 relative path 同乙個目錄的檔案引用 如果原始檔和引用檔案在同乙個目錄裡,直接寫引用檔名即可。我們現在建乙個原始檔info.html,在info.html裡要引用index.html檔案作為超連結。假設info.html路徑是 c inetpub wwwroot sit...

Python中絕對路徑的寫法

在使用open函式的時候遇到了一些小問題,我是用的是windows的電腦,目標是使用open 函式開啟絕對路徑為 e pycharm project student info.txt 的文字文件。我的第一段 是 open e pycharm project student info 結果系統報錯 f...

HTML相對路徑與絕對路徑

html相對路徑與絕對路徑 在網頁製作的過程中,少不了跟路徑打交道,比如,包含乙個檔案,插入乙個等,與路徑都有關係,如果使用了錯誤的檔案路徑,就會導致引用失效 無法瀏覽鏈結檔案,或無法顯示插入的等 初學者可能會感到困惑,下面我就詳細的介紹一下相對路徑與絕對路徑。html有2種路徑的寫法 相對路徑和絕...