A Scriptlet is a regular HTML page that has two main parts: body and script code. However, a Scriptlet is also a very peculiar HTML page, whose scripting code makes it programmable from external callers, such as a host HTML page or a Visual Basic form. There is a strict relationship between the body and script. The body includes the objects on which script code will work in order to produce the desired effect. Since both code and body are contained in the same file, we have a self-contained component ready to be used as an object. In addition, the script code uses a conventional syntax to make public some of its own variables and routines. In this way we can automate the behavior and the appearance of the page:
As we mentioned earlier, a Scriptlet's automation interface is expressed in terms of properties, methods and events.