2008-04-27
HTML and XML的行为
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>
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>
- 17:16
- 浏览 (88)
- 评论 (0)
- 分类: xml和html基础
- 相关推荐
发表评论
我的相册
CIMG0924
共 34 张
共 34 张
链接
最新评论
-
C3P0连接池的相关配置
c3p0使用实例 public class DBConn   ...
-- by beyondsanli -
优秀员工感想
写的很有内涵我很喜欢 挺有特色的
-- by blucedong -
编码之上传下载
import java.io.UnsupportedEncodingExcept ...
-- by beyondsanli -
由功夫熊猫想到的
评论转载自:http://bbs.gxsd.com.cn/viewthread. ...
-- by beyondsanli -
由功夫熊猫想到的
评论转载自:http://bbs.gxsd.com.cn/viewthread. ...
-- by beyondsanli







评论排行榜