2016-04-30 71 views
1

我之前的链接工作,但现在他们不工作。此代码中是否存在特定的语法错误?谢谢。我的链接不工作

<p>A page dedicated to the mediocrity that is me.</p> 
 
     <a class="photo_hover3" href="AboutMe.html"><img src="images/10551720_896406100374418_8341950779733681498_o.jpg" width="240" height="290" alt="picture1" onmouseover="src='images/image1.jpg'" onmouseout="src='images/10551720_896406100374418_8341950779733681498_o.jpg'"/></a> 
 
     <a href="AboutMe.html"><span class="button">Read more</span></a> 
 
     </section> 
 
     <section class="group2"> 
 
     <h3>Classes</h3> 
 
     <p>A page on the classes I'm taking Spring Semester.</p> 
 
     <a class="photo_hover3" href="Classes.html"><img src="images/black-tarheel-sign-jpg.jpg" width="240" height="290" alt="picture2" onmouseover="src='images/image2.jpg'" onmouseout="src='images/black-tarheel-sign-jpg.jpg'"/></a> 
 
     <a href="Classes.html"><span class="button">Read more</span></a> 
 
     </section> 
 
     <section class="group3"> 
 
     <h3>Interests</h3> 
 
     <p>A page describing my hobbies and interests.</p> 
 
     <a class="photo_hover3" href="Interests.html"><img src="images/blackwhite,camera,canon,hands,nails,photography-eec2d4683bab11e4adc6fd271cda2979_h.png" width="240" height="290" alt="picture3" onmouseover="src='images/image3.png'" onmouseout="src='images/blackwhite,camera,canon,hands,nails,photography-eec2d4683bab11e4adc6fd271cda2979_h.jpg'"/></a> 
 
     <a href="Interests.html"><span class="button">Read more</span></a>

+1

因为链接发生了什么变化工作? “不工作”是什么意思?点击它们时什么也没有发生?或者浏览器显示页面未找到错误?要么...? – nnnnnn

+1

为什么你在图像src中有逗号? ' theblindprophet

+0

链接不会转到他们合适的html页面 – Geek117

回答

0

正如其他人在你的链接工作问题的意见都表示最有可能是您正在使用的路径。检查路径是否正确的一种方法是直接在浏览器中输入它,例如www.example.com/AboutMe.html/,如果这样会将您带到AboutMe页面,那么您的路径很好,如果不是,则需要检查您的文件夹/文件结构并找到关于我的页面所在的位置。如果页面在另一个文件夹,那么你就需要将该文件夹添加到您的路径,像这样:

 www.example.com/anotherfolder/AboutMe.html 

和你的链接应该是这样的:

<a href="/anotherfolder/AboutMe.html">About Me</a> 
+0

它工作正常,但其他页面链接工作正常,除了我在本文中提到的链接之外,它们具有相同的菜单项代码。 – Geek117