html页面怎么include另一个页面,怎样让多个页面共享一个style,而不用copy相同的style代码

believefym 2006-02-26 12:21:01
把style单独写成一个文件,然后页面引用?具体要怎么做?
...全文
377 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jFresH_MaN 2006-02-26
  • 打赏
  • 举报
回复
css
doway 2006-02-26
  • 打赏
  • 举报
回复
<jsp:include page="/inc/head.jsp" flush="true" />
<%@ include file="../inc/nav.jsp" %>

两者非常不同。

前者等于是调用另一个页面的输出,后者是将另一个页面合并进来再编译。
believefym 2006-02-26
  • 打赏
  • 举报
回复
如果是html而不是jsp呢?
还有,html页面怎么include另一个页面
doway 2006-02-26
  • 打赏
  • 举报
回复
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<LINK href="<%= request.getContextPath() %>/inc/xxx.css" type="text/css" rel="stylesheet">
<script language="JavaScript" src="<%= request.getContextPath() %>/inc/jjj.js"></script>
</head>
doway 2006-02-26
  • 打赏
  • 举报
回复
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<LINK href="<%= request.getContextPath() %>/inc/xxx.css" type="text/css" rel="stylesheet">
<script language="JavaScript" src="<%= request.getContextPath() %>/inc/jjj.js"></script>
</head>
believefym 2006-02-26
  • 打赏
  • 举报
回复
具体要怎么做?

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧