使用 HTC.. 另存为: toolbar.htc
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH onevent="contextmenu()" event="oncontextmenu"/>
<PUBLIC:ATTACH onevent="mouseover()" event="onmouseover"/>
<PUBLIC:ATTACH onevent="mouseout()" event="onmouseout"/>
<PUBLIC:ATTACH onevent="mouseup()" event="onmouseup"/>
<PUBLIC:ATTACH onevent="mousedown()" event="onmousedown"/>
</PUBLIC:COMPONENT>
<script language="JScript">
element.runtimeStyle.filter="Glow(Color='lime',Strength='10')";
function contextmenu()
{
event.returnValue=false;
}
function mouseover()
{
element.runtimeStyle.borderBottom="outset black";
element.runtimeStyle.borderTop="outset white";
element.runtimeStyle.borderLeft="outset white";
element.runtimeStyle.borderRight="outset black";
element.runtimeStyle.borderWidth="2px";
}
function mouseout()
{
element.runtimeStyle.posTop=element.style.posTop+2;
element.runtimeStyle.posLeft=element.style.posLeft+2;
element.runtimeStyle.filter="Glow(Color='lime',Strength='10')";
}
function mouseup()
{
element.runtimeStyle.borderBottom="outset black";
element.runtimeStyle.borderTop="outset white";
element.runtimeStyle.borderLeft="outset white";
element.runtimeStyle.borderRight="outset black";
}
function mousedown()
{
element.runtimeStyle.borderBottom="inset white";
element.runtimeStyle.borderTop="inset black";
element.runtimeStyle.borderLeft="inset black";
element.runtimeStyle.borderRight="inset white";
element.runtimeStyle.borderWidth="1px";
}
</script>
HTML file:
<a href="XXXXXXX" style="behavior:url(toolbar.htc);">XXXX</a>
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH onevent="contextmenu()" event="oncontextmenu"/>
<PUBLIC:ATTACH onevent="mouseover()" event="onmouseover"/>
<PUBLIC:ATTACH onevent="mouseout()" event="onmouseout"/>
<PUBLIC:ATTACH onevent="mouseup()" event="onmouseup"/>
<PUBLIC:ATTACH onevent="mousedown()" event="onmousedown"/>
</PUBLIC:COMPONENT>
<script language="JScript">
element.runtimeStyle.filter="Glow(Color='lime',Strength='10')";
function contextmenu()
{
event.returnValue=false;
}
function mouseover()
{
element.runtimeStyle.borderBottom="outset black";
element.runtimeStyle.borderTop="outset white";
element.runtimeStyle.borderLeft="outset white";
element.runtimeStyle.borderRight="outset black";
element.runtimeStyle.borderWidth="2px";
}
function mouseout()
{
element.runtimeStyle.posTop=element.style.posTop+2;
element.runtimeStyle.posLeft=element.style.posLeft+2;
element.runtimeStyle.filter="Glow(Color='lime',Strength='10')";
}
function mouseup()
{
element.runtimeStyle.borderBottom="outset black";
element.runtimeStyle.borderTop="outset white";
element.runtimeStyle.borderLeft="outset white";
element.runtimeStyle.borderRight="outset black";
}
function mousedown()
{
element.runtimeStyle.borderBottom="inset white";
element.runtimeStyle.borderTop="inset black";
element.runtimeStyle.borderLeft="inset black";
element.runtimeStyle.borderRight="inset white";
element.runtimeStyle.borderWidth="1px";
}
</script>
HTML file:
<a href="XXXXXXX" style="behavior:url(toolbar.htc);">XXXX</a>
解决方案 »
- 实现页面后台连接sql数据库,ajax前台显示数据库表的代码
- 30个基于jQuery的日期时间选择插件【好东西要分享】
- 100分 求 JS把层坐标写入input-hidden的代码
- js字符串追加问题
- 怎么得到一个不重复的随机数组
- 无人解决的问题:prototype & array问题
- setInterval 问题
- id.innerHTML="<script>alert('go')</script>"的实现方法?
- 奇怪,为什么在ie中javascript比vbscript性能差这么多?
- 新手一名,用eclipse中提交表单到servlet映射的路径出错了
- 有没有搞错?
- JavaScript 该如何处理中文参数?
a:hover
a:active
a:hover 就只能设置一种然而,使用 HTC ,你可以更加你参数的不同,设置很多样式..呵呵.