relaxlife.net Collection: HTC components making the whole process and help [Date: 2005-06-08] [From:] [Author: cexo255] HTML Component (HTC) Author: Anonymous Time: 2003-11-13 Document type: Reproduced From: Worry-free window In Microsoft IE 5.0 browser, the biggest challenge in web programming is not easy to create components to achieve the code reuse and multi-page sharing. This problem has been plaguing DHTML (dynamic HEML) web programming. They can only repeat the code from HTML, CSS, and JavaScript to meet the repetitive or similar functions on multiple pages. After the IE 5.0 browser is released, this situation has been improved. It brings us a new instruction combination method, which can encapsulate the code that implements a specific function in one component, so that multi-page code reuse, make web page programming Enter a new world. This new technology is what we have to talk about "Behaviors" in DHTML. "Behavior" As a simple and easy-to-use component, it encapsulates a specific function or action on the page. When a "behavior" attached to one component in the web page, the original behavior of this component changes. Therefore, web programming can develop universal DHTML instructions and change some properties of the original object, with "behavior" to enhance the functionality of an object, and simplify the HTML code of the page. And "behavior" creation and use is also very simple and convenient, and the knowledge you need is just the CSS style sheet, HTML instruction, and JavaScript scripting language that have been used. As long as you know this, there is a practical programming experience, learning and mastering the use of "behavior" is completely no problem. We will explain how to write and use a "behavior" and experience "Behavior", and experience "Behavior" and experience "Behavior" and experience "behavior". First create a text file called Font_EffTce.htc, which makes up the "Behaviors" component, is the extension of .htc, the content in this file is our description of this "behavior". Its creation and use steps are as follows: (1) First add a few event responses to this "behavior", the statement writing format is as follows:
The complete "behavior" document "font_effect.htc" is as follows: "Behavior" document start // Add four mouse events to "Behavior"