87,991
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>什么事jQuery?</title>
<style type="text/css">
h5.head
{
background-color: Gray;
width: 100px;
height: 20px;
}
.content
{
visibility: hidden;
}
</style>
<!--<script type="text/javascript" language="javascript">
window.onload = function () {
alert("Hello!");
}
</script>-->
<script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript">
$(document).ready(function () {
alert("Hello!");
});
$(function () {
$("#panel h5.head").bind("click", function () {
$(this).next("div.content").show();
});
});
$(document).ready(function () {
alert("Hello2!");
});
</script>
</head>
<body>
<div id="panel">
<h5 class="head">
什么是jQuery?</h5>
<div class="content">
jQuery 是继 prototype 之后又一个优秀的 Javascript 框架。 其宗旨是—写更少的代码,做更多的事情。 它是轻量级的 js 库(压缩后只有21k),这是其它的
js 库所不及的,它兼容 CSS3,还兼容各种浏览器(IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)。 jQuery是一个快速的,简洁的
javaScript 库,使用户能更方便地处理 HTML documents、events、实现动画效果,并且方便地为网站提供AJAX交互。
</div>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style type="text/css">
h5.head
{
background-color: Gray;
width: 100px;
height: 20px;
}
.content
{
visibility: hidden;
}
</style>
<script type="text/javascript" language="javascript" src="D:\ets_test\Js\jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
alert("Hello!");
});
/*$(function () {
$("#panel h5.head").bind("click", function () {
$(this).next("div.content").show();
});
});*/
$(document).ready(function(){
$(".head").click(function(){
$(".content").css('visibility','visible');
});
});
$(document).ready(function () {
alert("Hello2!");
});
</script>
</head>
<body>
<div id="panel">
<h5 class="head">
什么是jQuery?</h5>
<div class="content">
jQuery 是继 prototype 之后又一个优秀的 Javascript 框架。 其宗旨是—写更少的代码,做更多的事情。 它是轻量级的 js 库(压缩后只有21k),这是其它的
js 库所不及的,它兼容 CSS3,还兼容各种浏览器(IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)。 jQuery是一个快速的,简洁的
javaScript 库,使用户能更方便地处理 HTML documents、events、实现动画效果,并且方便地为网站提供AJAX交互。
</div>
</div>
</body>
</html>
.content { display: none; }