把style单独写成一个文件,然后页面引用?具体要怎么做?

解决方案 »

  1.   

    <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>
      

  2.   

    <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>
      

  3.   

    如果是html而不是jsp呢?
    还有,html页面怎么include另一个页面
      

  4.   

    <jsp:include page="/inc/head.jsp" flush="true" />
    <%@ include file="../inc/nav.jsp" %>两者非常不同。前者等于是调用另一个页面的输出,后者是将另一个页面合并进来再编译。