There are many ways to use the htc component to create a windows tab on the webpage. Here we will introduce a simple method-using the htc component.
The advantage of using htc is that it can be freely called and is a bit batch-processed. For example, if you want to use this tab on many webpages, you only need to create an htc, then they are called separately on different web pages without having to make them again. It is easy to use and saves a lot of time.
The procedure is as follows:
1. Download mpc. htc
First, go to the Microsoft Site to download a component named "mpc. htc", which is the raw material for making the windows tab.
2. Edit the webpage and call the mpc. htc
1. Write the html tag as follows:
Reference:
2. Create a style behavior:
Reference:
That is to say, both the mpc \: iner and the mpc \: page call the mpc. htc
3. Call specific content:
Reference:
ID = "name"
TABTITLE = "the content here will be prompted by the mouse"
TABTEXT = "here is the content of the tab label">
Here is the specific content of the tab
Here, the <mpc: container> label uses the width and height of the style to determine the width and height of the entire tab. Then, in the <mpc: page> ...... </Mpc: page> the content of tabs added between tags. You can use several groups of tabs with the following options: <mpc: page> ...... </MCM: page> label.
Code for the windows tab Sample page in the appendix:
Reference:
Mpc
Write text here ......
Hyperlink
Http://msdn.microsoft.com/downloads/samples/internet/behaviors/library/mpc/mpc.htc
Put the htc file in the same directory as the htm file where your tab is located, or change the location of htc in the following section in the source code of the page.
MCM \: container {
Behavior: url (mpc. htc );
}
MCM \: page {
Behavior: url (mpc. htc );
}