Example of HTC getting started (2)
<! -- ******************* Input. HTC ******************* -->
<SCRIPT>
Switch (type)
{
Case 'text ':
Case 'Password': // text input box and password input box style
Style. Border = "1px solid #000000 ";
Style. backgroundcolor = "# ffffff ";
Style. Height = "18px ";
Style. font = "normal 12px ";
Style. color = "#000000 ";
Break;
Case 'submit ':
Case 'reset ':
Case 'button ': // button style (excluding image buttons)
Style. Border = "1px solid #000000 ";
Style. backgroundcolor = "# cccccc ";
Style. Height = "18px ";
Style. font = "normal 12px ";
Style. color = "#000000 ";
Break;
Default: // we use the default style for elements that have not been shown in a single-choice multiple-choice box.
;
}
</SCRIPT>
<! -- ************************** Demo2.html ************ *************************** -->
<Head>
<Title> Use HTC to customize a unified form style instance </title>
<Style type = text/CSS>
Body {Font: normal 14px ;}
Input {behavior: URL ('input. HTC ');}
</Style>
</Head>
<Body>
<Form>
Text Box: <input type = text> <br>
Password Input box: <input type = PASSWORD> <br>
File selection box: <input type = File> <br>
Single statement: <input type = checkbox> <br>
Multiple selection box: <input type = radio> <br>
Submit button: <input type = submit value = submit> <br>
Reset button: <input type = reset value = reset> <br>
Normal button: <input type = button value = return> <br>
Image buttons: <input type = image src?button.gif>
</Form>
</Body>
Note: First, you must find an image named ~button.gif.
This example shows more about HTC's support for styles, giving people a new feeling. HTC files can also be learned in this way. No object, no event, no method.