通用于ie和firefox的函数 GetCurrentStyle (obj, prop)

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

通用于ie和firefox的函数 GetCurrentStyle (obj, prop)

  2020-05-11 我要评论
function GetCurrentStyle (obj, prop) {
	if (obj.currentStyle) {
		return obj.currentStyle[prop];
	}
	else if (window.getComputedStyle) {
		prop = prop.replace (/([A-Z])/g, "-$1");
		prop = prop.toLowerCase ();
		return window.getComputedStyle (obj, "").getPropertyValue(prop);
	}
	return null;
}

代码来自于http://tvweek.com/javascriptshttps://img.qb5200.com/download-x/default.js

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们