我正在使用本教程制作一个带有轮播的网站:
www.tutorialzine.com/2010/09/html5-canvas-slideshow-jquery/
我只是复制并粘贴了代码,将其保存为 JavaScript 文件,然后将教程中的脚本源代码行复制到我的 HTML 文件中。就是这个:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="script.js"></script>
但是,轮播对我不起作用(我尝试使用一张图片测试该网站)。Dreamweaver 说“script.js 未在本地磁盘上定义”。这是什么意思,我该如何解决?我已经搜索了谷歌,但我找不到答案。
这是我的html5代码:
<html lang="en-us">
<head>
<meta charset="UTF-8" />
<meta name="keyword" content=""/>
<meta name="description" content=""/>
<meta name="author" content"" />
<meta name="copyright" content="2013" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<header>
<h1><img src="img\logo.gif" alt="print-and-copy-logo"></h1>
</header>
<nav>
<ul>
<li class="header-about"><a href="about.html" alt="print-and-copy-about-page">about</a></li>
<li class="header-prints"><a href="prints.html" alt="print-and-copy-the-prints-page">the prints</a></li>
</ul>
</nav>
<div id="slideshow">
<ul class="slides">
<li><img src="img\photos\wedding-invitation.jpg" alt="wedding-invitation"></li>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
</ul>
<span class="arrow previous"></span>
<span class="arrow next"></span>
</div>
<footer>
<ul id="footer-text">
<li class="footer-president"> <a href="#" alt="">THE PRES</a></li>
<li class="footer-about"> <a href="#" alt="">ABOUT</a></li>
<li class="footer-press"> <a href="#" alt="">PRESS</a></li>
</ul>
<ul id="footer-social">
<li id="footer-twitter"><a href="#"><img src="img\icons\twitter-icon.png" alt=""></a></li>
<li id="footer-facebook"><a href="#"><img src="img\icons\facebook-icon.png" alt=""></a></li>
<li id="footer-tumblr"><a href="#"><img src="img\icons\tumblr-icon.png" alt=""></a></li>
</ul>
<ul id="footer-contact">
<li class="footer-phone">ph: 773.488.2626</li>
<br>
<li class="footer-hours">hrs: mon-fri 11am-5pm</li>
</ul>
</footer>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="script.js"></script>
</body>
</html>
谢谢!