Home  >  Article  >  Web Front-end  >  Several ways to introduce other html files into html files

Several ways to introduce other html files into html files

黄舟
黄舟Original
2016-12-14 11:00:512703browse

Introduction: Netizens often ask in forums, can I read the content of another html file in an html file? The answer is yes, and there is more than one method. In the past, I would only use iframe to reference, but later I found several other methods. So today I will summarize these methods for your reference. I think the third method is better. good!
1.IFrame is introduced, look at the code below

You will If you see an externally imported file, but you will find something like an outer frame surrounding it, you can use:
But you will find that there is still a problem, that is, the background color is different. You only need to use the same background color in the imported file import.htm, but if you use If it is IE5.5, you can read this article about transparent colors. If you want to prevent the scroll bar from appearing when the imported file is too long, add scroll=no to the body in import.htm
2. method

3. Download method of Behavior