抽取页面相同的内容,页首,页尾,以及一些固定的元素

 book_manager_menu.jsp

<%--
  Created by IntelliJ IDEA.
  User: 星辰
  Date: 2020/8/7
  Time: 15:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
    <a href="manager/bookServlet?action=list">图书管理</a>
    <a href="pages/manager/order_manager.jsp">订单管理</a>
    <a href="index.jsp">返回商城</a>
</div>

foot.jsp 

<%--
  Created by IntelliJ IDEA.
  User: 星辰
  Date: 2020/8/6
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="bottom">
			<span>
				尚硅谷书城.Copyright &copy;2015
			</span>
</div>

 head.jsp

 

<%--
  Created by IntelliJ IDEA.
  User: 星辰
  Date: 2020/8/6
  Time: 15:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<base href="http://localhost:8080/book/">
<link type="text/css" rel="stylesheet" href="static/css/style.css" >
<script type="text/javascript" src="static/script/jquery.js"></script>

login_success_menu.jsp 

<%--
  Created by IntelliJ IDEA.
  User: 星辰
  Date: 2020/8/6
  Time: 15:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/pages/common/head.jsp"%>
<div id="header">
    <img class="logo_img" alt="" src="static/img/logo.gif" >
    <div>
        <span>欢迎<span class="um_span">${sessionScope.user.username}</span>光临尚硅谷书城</span>
        <a href="/book/pages/order/order.jsp">我的订单</a>
        <a href="userServlet?action=logout">注销</a>&nbsp;&nbsp;
        <a href="index.jsp">返回</a>
    </div>
</div>

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用Spire.Doc复制第一内容并在插入复制内容,可以使用以下步骤: 1. 先获取第一内容,例如`Section sourceSection = doc.Sections[0]`。 2. 然后将第一内容复制到一个新的`Document`对象中,例如`Document newDoc = new Document()`和`newDoc.Sections.Add(sourceSection.Clone())`。 3. 接着获取新文档的最后一的位置,例如`int lastPageIndex = newDoc.Sections.Count - 1`。 4. 在新文档的最后一插入需要添加的内容,例如`newDoc.Sections[lastPageIndex].HeadersFooters.Footer.AddParagraph().AppendText("Footer Text")`。 5. 最后将新文档的内容插入到原始文档的第一之后,例如`doc.Sections.InsertRange(1, newDoc.Sections)`。 以下是一个完整的示例代码: ``` // 获取原始文档 Document doc = new Document("Original.docx"); // 获取第一内容 Section sourceSection = doc.Sections[0]; // 将第一内容复制到一个新的文档对象中 Document newDoc = new Document(); newDoc.Sections.Add(sourceSection.Clone()); // 获取新文档的最后一的位置 int lastPageIndex = newDoc.Sections.Count - 1; // 在新文档的最后一插入需要添加的内容 newDoc.Sections[lastPageIndex].HeadersFooters.Footer.AddParagraph().AppendText("Footer Text"); // 将新文档的内容插入到原始文档的第一之后 doc.Sections.InsertRange(1, newDoc.Sections); // 保存修改后的文档 doc.SaveToFile("Modified.docx", FileFormat.Docx); ``` 上述示例中,`doc`表示需要操作的`Document`对象。使用以上步骤即可完成复制第一内容并在插入复制内容的操作。需要注意的是,以上示例仅适用于复制单个页面内容,如果需要复制多个页面内容,需要将以上步骤重复执行多次。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值