IE中behavior引用htc案例

test1.html



<!doctype html>
<html lang="en">
<head>
    <!--设置equiv属性-->
    <meta charset="UTF-8">
    <meta http-equiv="content-Language" contect="zh-CN">
    <!--设定网页的过期时间-->
    <meta http-equiv="Pragma" content="no-cache">
    <!--指定是否允许用户自己缩放-->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <!--忽略将页面中的数字识别为电话号码-->
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="no">
    <style>
        h1{behavior:url(pie.htc)}
    </style>
</head>
<body>
<h1>把鼠标放在这里</h1>
</body>
</html>





pie.htc

<public:attach event="onmouseover" onevent="befor()" />
<public:attach event="onmouseout" onevent="after()" />
 
 
<script type="text/javascript">
    function befor(){
    this.style.backgroundColor="#7FFFAA";
    this.style.color="red";
    this.style.cursor="pointer";
    }
    function after(){
    this.style.backgroundColor="";
    this.style.color="";
    this.style.cursor="";
    }
</script>

 

posted on 2015-02-06 15:10 资江河畔 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/yudishow/p/4277198.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值