<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>豪情</title>
<script type="text/javascript" src="http:///ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<style>
*{margin:0;padding:0;font-size:12px;}
h3{margin:20px auto;text-align:center;}
input{width:120px;height:30px;cursor:pointer;}
h1{width:70%;border:1px solid #ccc;background:#eee;padding:5px;cursor:pointer;}
#content{width:70%;border:1px solid #9BDF70;background:#F0FBEB;display:none;padding:5px;}
</style>
<script>
$(function(){
$('h1').click(function(){
$('#content').slideToggle();
return false;
});
$('#content a').click(function(){
$('#content').slideUp();
return false;
});
});
</script>
</head>
<body>
欢迎加入js学习团队:3643843
</div>
</body>
</html>

运行代码

也没什么技术含量,

主要是return false,阻止打开链接,也可以用 event.preventDefault();