首頁區

<!--HTML5(035)超連結到子資料夾的文件-->
<!doctype html>
<html>
<head>
    <meta charset = "utf-8">
    <title>HTML5(035)超連結到子資料夾的文件</title>
</head>
<body>
<header>
    <h1>首頁區</h1>
</header>
<p>
    <a href = "index1.html">index1</a>
    <!--使用超連結進入index1.html文件-->
</p><p>
    <a href = "index2.html">index2</a>
</p><p>
    <a href = "child/child1.html">child1</a>
    <!--使用超連結進入子資料夾child的child1.html文件-->
</p>
</body>
</html>

結果為:

image

子資料夾child的child1.html文件

<!--HTML5(035)超連結到子資料夾的文件-->
<!doctype html>
<html>
<head>
    <meta charset = "utf-8">
    <title>HTML5(035)超連結到子資料夾的文件</title>
</head>
<body>
<header>
    <h1>child1</h1>
</header>
</header>
<p>
    <a href = "index1.html">index1</a>
</p><p>
    <a href = "index2.html">index2</a>
</p>
</body>
</html>

結果為:

image

child資料夾 在HTML5(034)同一份文件跳到另一份文件 資料夾內

稱為'子資料夾'而 在HTML5(034)同一份文件跳到另一份文件這個

資料夾則稱為'父資料夾'。

image

image

如果照上面的程式碼在cild1上輸入點選index1和index2會進入不了,

那是因為子資料夾要超連結父資料夾也需要加上父資料夾的位址,下

一課會講解。

 

 

 

arrow
arrow
    創作者介紹
    創作者 愛學習 的頭像
    愛學習

    愛學習

    愛學習 發表在 痞客邦 留言(0) 人氣()