Call the public part of the webpage header and tail

Source: Internet
Author: User
Dynamic pages can be referenced by containing statements. Javascript can be used to reference a pure static page.
Dynamic pages are not used as an example. For a static page: index.html:
Original page <HTML>
<Head>
<Title> test </title>
</Head>
<Body>
<Div id = "content"> test content </div>
<Div id = "bottom"> bottom </div>
</Body>
</Html>
Next we split this page. The first is the top page:
Top.html: Document. Write ("<HTML> Next, the bottom page: bottom.html: Document. Write ('<Div id = "bottom"> bottom </div> </body> Finally, the browser page index: index.html:
<SCRIPT type = "text/JavaScript" src = "top.html"> </SCRIPT>
<Div id = "content"> test content </div> <SCRIPT type = "text/JavaScript" src = "bottom.html">
</SCRIPT>
Note that the top and bottom pages must use the document. Write () statement to output HTML,
It is best to output all the HTML in a row. If the output cannot be in a row, use the + number to connect. Note that single double quotation marks cannot be used together; otherwise, they cannot be displayed.
1. asp and shtml file import commands
<! -- # Include file = "../include/mayihome_com.asp" -->
2. Import commands for PHP Execution files
<? PHP Include ("include/header. php");?>
2. jsp execution File Import command
<JSP: Include page = "miniguide. jsp"/>
-----------------------
The following are the execution files supported by the Web server.
Apache PhP5 supports PHP
IIS supports ASP
Tomcat supports JSP


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.