<!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> <mce:script language="javascript" src="jquery-1.4.2.min.js" mce_src="jquery-1.4.2.min.js"></mce:script> <mce:script type="text/javascript"><!-- $(document).ready(function(){ $("span.letter").hide(); $("p").click(function(){$(this).next("span.letter").slideToggle(500);}); }); // --></mce:script> </head> <body> <p>测试1</p> <span class="letter">测试1一下</span> <p>测试2</p> <span class="letter">测试2一下</span> </body> </html>