XML 行为behavior 新的DHTML?
  behavior是一个css属性选择器,他指向一个包含了特殊代码并且能够改变html页面元素的xml文件htc
  行为behavior并不是w3c标准,他只是Microsoft的技术

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文件验证
<html>
<head>
<style>
h1 { behavior: url(behave.htc) }
</style>
</head>
<body>
<h1>Move your Mouse over me</h1>
</body>
</html>
评论
发表评论

您还没有登录,请登录后发表评论

beyondsanli
搜索本博客
我的相册
Be4dd72d-74eb-3b6c-bd66-8c88bf719186-thumb
CIMG0924
共 34 张
存档
最新评论