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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章