Lets apply the Best practices to the Image Gallery .

/***      index.html      ***/

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Image Gallery</title>
    <link rel="stylesheet" href="styles/layout.css" media="screen">
</head>
<body>

    <h1>Snapshiots</h1>
    <ul id="imagegallery">
        <li>
            <a href="images/fireworks.jpg" title="A fireworks display"> Fireworks </a>
        </li>
        <li>
            <a href="images/coffee.jpg" title="A cup of black coffe"> Coffee </a>
        </li>
        <li>
            <a href="images/rose.jpg" title="A red, red rose"> Rose </a>
        </li>
        <li>
            <a href="images/bigben.jpg" title="The famous clock"> Big Ben </a>
        </li>
    </ul>
    <div id="placeholder">
        <img src="images/placeholder.gif" alt="my image gallery" >
    </div>
    <div id="description">
        <p>Choose an image</p>
    </div>

    <script type="text/javascript" src="scripts/showPic.js"></script>

    <script type="application/javascript">
//        alert (description.childNodes.length);
//        window.onload = countBodyChildren;
//var description = document.getElementById("description");
//alert (description.childNodes[2].nodeValue);
    </script>
</body>
</html>
View Code

相关文章:

  • 2021-06-03
  • 2022-01-16
  • 2022-01-22
  • 2021-10-16
  • 2022-12-23
  • 2021-06-02
  • 2021-05-22
  • 2022-01-06
猜你喜欢
  • 2021-10-19
  • 2022-01-18
  • 2021-05-30
  • 2021-11-27
  • 2022-02-03
  • 2021-09-16
相关资源
相似解决方案