xml实现文字变色

文件1名: test.html
<head>
<style>
h1 {behavior:url(behave.htc)}
</style>
</head>
<h1>看看能不能变色</h1>


文件2名:behave.htc
<component>
<attach for="element" event="onmouseover"
handler="hig_lite" />
<attach for="element" event="onmouseout"
handler="low_lite" />
<script type="text/javascript">
function hig_lite()
{
element.style.color=255
}
function low_lite()
{
element.style.color=0
}
</script>
</component>

你可能感兴趣的:(html,xml,HTC)