• <abbr id="chdyf"></abbr>
    <ruby id="chdyf"><acronym id="chdyf"><meter id="chdyf"></meter></acronym></ruby>
    <bdo id="chdyf"></bdo>
    <dfn id="chdyf"><menu id="chdyf"></menu></dfn>
    1. <menuitem id="chdyf"></menuitem><strong id="chdyf"><menu id="chdyf"></menu></strong>

      <rt id="chdyf"><menu id="chdyf"></menu></rt>
      成人小说一区二区三区,伊人精品成人久久综合全集观看,久久HEZYO色综合,中文字幕精品人妻熟女,影音先锋成人网站,我要看免费一级毛片,中国女人做爰A片,中文字幕av久久爽Av

      include指令標記與動作標記詳解

      2018-5-10    seo達人

      如果您想訂閱本博客內容,每天自動發到您的郵箱中, 請點這里

      一.include指令標記

      include指令標記用于把JSP文件,HTML網文文件等文件靜態嵌入當前JSP網頁中,語法如下:

      [html] view plain copy
      1. <%@include file="xxURL"%>  

      靜態嵌入就是“先包含后處理”在編譯階段完成對文件嵌入,即先將當前JSP頁面與被嵌入文件合并成一個新的JSP頁面

      eg:

      [html] view plain copy
      1. <%@ page language="java" contentType="text/html; charset=utf-8"  
      2.     pageEncoding="ISO-8859-1"%>  
      3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
      4. <html>  
      5. <head>  
      6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
      7. <title>Insert title here</title>  
      8. </head>  
      9. <body>  
      10.         <font color="red"size=5>  
      11.             lalla  
      12.         </font>  
      13. </body>  
      14. </html>  
                  
      [html] view plain copy
      1. <%@ page language="java" contentType="text/html; charset=utf-8"  
      2.     pageEncoding="UTF-8"%>  
      3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
      4. <html>  
      5. <head>  
      6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
      7. <title>include動作標記</title>  
      8. </head>  
      9. <body>  
      10.     <br>  
      11.         <jsp:include page="demo.jsp"/>  
      12.     </br>  
      13. </body>  
      14. </html>  
      運行結果如下:


      二.include動作標記:

      動作標記是將JSP等文件動態嵌入當前JSP網頁中,語法如下:
      [html] view plain copy
      1. <jsp:include page="xxURL"/>  

      [html] view plain copy
      1. <jsp:include page="xxURL">  
      2.    子標記  
      3. <jsp:include/>  

      動態嵌入就是“先處理后包含”在運行階段完成對文件嵌入,即在把JSP頁面轉譯為JAVA文件時,并不合并兩個頁面。

      eg:

      [html] view plain copy
      1. <%@ page language="java" contentType="text/html; charset=utf-8"  
      2.     pageEncoding="ISO-8859-1"%>  
      3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
      4. <html>  
      5. <head>  
      6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
      7. <title>Insert title here</title>  
      8. </head>  
      9. <body>  
      10.         <font color="red"size=5>  
      11.             lalla  
      12.         </font>  
      13. </body>  
      14. </html>  

      [html] view plain copy
      1. <%@ page language="java" contentType="text/html; charset=utf-8"  
      2.     pageEncoding="UTF-8"%>  
      3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
      4. <html>  
      5. <head>  
      6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
      7. <title>include動作標記</title>  
      8. </head>  
      9. <body>  
      10.     <br>  
      11.         <jsp:include page="demo.jsp"/>  
      12.     </br>  
      13. </body>  
      14. </html>  

      運行結果:

      總結:靜態嵌入中嵌入頁面與原頁面合并了,動態嵌入則還沒有。

      動態嵌入與靜態嵌入相比較,動態嵌入執行速度稍慢,但是靈活性較高。

      藍藍設計www.wtxcl.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 平面設計服務


      日歷

      鏈接

      個人資料

      藍藍設計的小編 http://www.wtxcl.cn

      存檔