欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

jsp中折叠式标签的代码实现

程序员文章站 2023-11-10 14:45:52
将代码和附件中带的css和js部署到项目中去即可运行 <%@ page contentType="text/html; charset=utf-8" l...

将代码和附件中带的css和js部署到项目中去即可运行

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
</head>


<body>
<p id="Accordion1" class="Accordion" tabindex="0">
  <p class="AccordionPanel">
    <p class="AccordionPanelTab">标签 1</p>
    <p class="AccordionPanelContent">内容 1</p>
  </p>
  <p class="AccordionPanel">
    <p class="AccordionPanelTab">标签 2</p>
    <p class="AccordionPanelContent">内容 2</p>
  </p>
</p>
<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
</script>
</body>
</html>

 附件解压后放到webroot下。。