IE7任意元素均支持hover的css偽類,IE6僅a元素支持,此時(shí),可通過(guò)css里加入event:expression的方式來(lái)達(dá)到css控制的效果:
<html>
<head>
<style>
.c
{
background:#ff0000;
event:expression(
onmouseover=function(){
this.style.backgroundColor='#FF0000';
},
onmouseout=function(){
this.style.backgroundColor='#0000FF';
}
);
}
</style>
</head>
<body>
<form name="form1">
</form>
<input type="button" class="c" value="VALUE" />
</body>
</html>






















