登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

820716的博客-知识分享 向上的心!

知识分享 开阔向上的心胸! http://www.820716.net/blog

 
 
 

日志

 
 

腾讯 JS loadPng( ) IE6 IE7 filter:progid:DXImageTransform.Microsoft.AlphaImageLoader  

2009-03-26 20:30:03|  分类: 个人日记 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>腾讯首页</title>
<script language="javascript" type="text/javascript">
var MiniSite=new Object();
MiniSite.Browser={
    ie:/msie/.test(window.navigator.userAgent.toLowerCase()),
    moz:/gecko/.test(window.navigator.userAgent.toLowerCase()),
    opera:/opera/.test(window.navigator.userAgent.toLowerCase()),
    safari:/safari/.test(window.navigator.userAgent.toLowerCase())
};

function loadPng(o)
{
    if(MiniSite.Browser.ie)
    {
        try
        {
            var img = o;
            var imgName = o.src.toUpperCase();
            if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
            {
                var imgID = (img.id) ? "id='" + img.id + "' " : "";
                var imgClass = (img.className) ? "class='" + img.className + "' " : "";
                var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
                var imgStyle = "display:inline-block;" + img.style.cssText;
                if (img.align == "left") imgStyle = "float:left;" + imgStyle;
                if (img.align == "right") imgStyle = "float:right;" + imgStyle;
                if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle ;  
                var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>";
                img.outerHTML = strNewHTML;           
            }
        }   
        catch (e)
        {}
    }
}
</script>
<base target="_blank">
</head>
<body>
<div style="background-color:#000000"><img src="http://dsafasdfasfsadf.chinaacc.com/images/index/zbnews.png" onload="loadPng(this)" /></div>
    <img src="http://www.chinaacc.com/upload/html/2009/3/25/xinyan285820093259175351129.jpg" onload="loadPng(this)" />
</body>
</html>



------------------
陈龙
QQ:84047848
MSN:dragonchen82@hotmail.com



 
  评论这张
 
阅读(2910)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018