-8

这真的很奇怪。如果我访问我的网站 www.example.com,jQuery 将无法在我的索引文件/主页上运行。但是,如果我输入 www.example.com/index.html jQuery 加载就好了。任何想法发生了什么或如何解决这个问题?

http://www.japaneselanguagefriend.com

http://www.japaneselanguagefriend.com/index.html

4

2 回答 2

1

http://www.japaneselanguagefriend.com/

某些标签不存在,例如:<body>标签

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title>Japanese Language Friend - An Artistic Approach to Learning Japanese! </title>
  <META name="description" content="Learn Japanese by stimulating artwork! Join our community and lay down the first stepping stone to improving your Japanese language skills"><META name="keywords" content="Japanese art, Japanese, Japan, Learning Japanese, learning japanese, study japanese, fluent japanese,  japanese language friend, help with japanese, amazon japanese language, second language, japanese language community, japanese language friends, japanese language friend">
</head>
<frameset rows="100%,*" border="0">
  <frame src="http://japanesefriend.zxq.net" frameborder="0" />
  <frame frameborder="0" noresize />
</frameset>

<!-- pageok -->
<!-- 07 -->
<!-- -->
</html>
于 2012-09-03T05:51:11.470 回答
1

您尝试在包含 jQuery 之前使用它:

  <script>$(document).ready(function() {
    $("a.register").fancybox({
        'type': 'iframe'
    });
});
</script>
<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>

确保这是第一个:

<script src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
于 2012-09-03T05:51:58.130 回答