我刚开始使用jquery。我下载的jQuery“http://code.jquery.com/jquery-1.4.2.min.js”从jquery.com..accessed在我的HTML文件..不能使用jquery
<html>
<head>
<title> Jquery fundentals</title>
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<style type="text/css">
#box{
background: red;
width: 300px;
height: 300px;
}
</style>
<script type="text/javascript">
$(function(){
$('a').click(function(){
$('box').fadeOut();
});
});
</script>
</head>
<body>
<div id="box"> </div>
<a href="#"> Click Me! </a>
</body>
</html>
仍然无法看到浏览器中的效果?
也试过“http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”......但没有用 可以解释一下这个问题吗? 我试过三种浏览器。谷歌浏览器,Mozilla和Internet Explorer。
您在文章中缺少一些代码。 – spinon 2010-07-01 09:36:42