It is easy to reference an external page on a JSP page. Use the following statement: <! --Include File= "Page to be referenced"->
But in HTMLStatic PageIt is not that convenient to reference external pages. The main methods are as follows:
1. The framework is used for implementation, but it occupies a large number of threads and is slow;
<IFRAME name = "neepage" width = 100% Height = 30 marginwidth = 0 marginheight = 0 src = "header.htm"> </iframe>
Some of its attributes can achieve some transparency, no scroll bar, and other specific effects. You can refer to the introduction of the HTML tutorial.
2. Use.JSScript implementation
Is to convert the relevant HTML fileJSFile.
<SCRIPT src = "import.JS"> </SCRIPT>
Or <SCRIPT src = "import. asp"> </SCRIPT>, the content in import. asp must beJSEnter.
If you use this method to include headers and navigation bars, it will not be conducive to search engine collection.
In addition, writeJSThe output Content Code is messy and prone to errors.
3. The following is an implementation method:
It is better to have a method, just like when an ASP page contains other pages, you can use a short containing statement. do not show the content to be included in this page, instead, it is split to another page.
<Span id = showimport1> </span>
<Ie: Download id = "odownload1" style = "behavior: URL (# default # download)"/>
<SCRIPT>
Function ondownloaddone (downdata ){
Showimport1.innerhtml = downdata
}
Odownload1.startdownload('top.htm', ondownloaddone)
</SCRIPT>
Note: If the contained page is top.htm, you only need to change the page to be included! Here, id = showimport cannot be changed to others. This method is to include a file at a time.
4. <Object> I personally think this method is more convenient.
<Object type = "text/X-scriptlet" Data = "import.htm" width = 100% Height = 30> </Object>
5. Behavior Download Method
<Span id = showimport> </span>
<Ie: Download id = "odownload" style = "behavior: URL (# default # download)"/>
<SCRIPT>
Function ondownloaddone (downdate ){
Showimport. innerhtml = downdate
}
Odownload.startdownload('import.htm', ondownloaddone)
</SCRIPT>
6. Execute SSL in HTML
In this situation, only index.html is available, but the homepage must be dynamic. In addition to the above method, you can use SSL
[! -- # Exec CGI = "index. pl" --]
1. Open "server-side inclusion" on the server"
2. Change your static file extension to: shtml
3. Add <! --#Include File= "The file you want to include" -->