代码如下:
<html>
<head>
<meta charset="utf-8"/>
<style>
*{ margin:0; padding:0;}
body{font-size:15px;}
#container{ margin:60px; line-height:2em; width:300px; border:1px solid #ccc;}
.head{ background:#999; padding:5px; cursor:pointer;}
.content{ text-indent:15px;}
</style>
<script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>
<script>
$(function(){
$("h5.head").toggle(function(){
$("p.content").fadeout(3000);
},function(){
$("p.content").fadein(3000);
});
})
</script>
</head>
<body>
<p id="container">
<h5 class="head">什么是jquery?</h5>
<p class="content">
jquery是继prototype原型之后又一个javascript库,他凭借简单的代码和完善的兼容性,再加上强大的dom操作,完善的事件处理机制,强大的ajax操作,加大的简化了javascript开发人员的工作。
</p>
</p>
</body>
</html>
如对本文有疑问, 点击进行留言回复!!
Android 入门第七讲01-数据存储(数据存储概述,文件存储(raw和asserts目录读写,data/data/包名目录读写,sdcard目录读写),SharedPreferences读写)
vue-axios系列:axios拦截器,配置请求头,配置请求参数
Vuejs 针对 安卓低版本 、ios9.x 不兼容 ES6语法导致失效解决方法
网友评论