Cssfile:
Input {
Behavior:url (BINDBUTTON.HTC);
}
Htcfile:
<public:component lightweight=true>
<public:attach event= "Oncontentready" onevent= "load ()"/>
<public:attach event= "onmouseout" onevent= "mouseout ()"/>
<public:attach event= "onmouseover" onevent= "MouseMove ()"/>
<public:attach event= "onmousedown" onevent= "MouseDown ()"/>
<public:attach event= "onmouseup" onevent= "MouseUp ()"/>
<public:property name= "direction"/>
<script language= "JScript" >
function Load ()
{
if (element.tagname = = ' INPUT ' && (element.type = ' button ' | | | element.type = ' Submit ' | | Element.type = = ' Reset ') || (Element.tagname = = ' BUTTON '))
{
element.style[' background '] = ' ... ';
}
element.style.border = (element.type== ' CheckBox ' | | element.type== ' Radio ')? ' None ': ' 1px double #888888 ');
}
function setimage (simg)
< span Arial Narrow '; font-size:14px; line-height:26px; ">{&NBSP
if (bset)
{&NBSP
//element.style[' background '] = ' URL (' + simg + ') ';
}
}
function Mouseout () {setimage (Anormal[idir]); try{element.style.mozopacity=0.8;element.filters.alpha.opacity=80;} catch (e) {}}
function MouseMove () {setimage (Aover[idir]); try{element.style.mozopacity=1;element.filters.alpha.opacity=100;} catch (e) {}}
function MouseDown () {setimage (Aclick[idir]);}
function MouseUp () {setimage (Anormal[idir]);}
</SCRIPT>
</PUBLIC:COMPONENT>
Note : More wonderful articles please pay attention to the triple web Design tutorial section.