首页 > 编程 > JavaScript > 正文

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

2019-11-21 02:23:23
字体:
来源:转载
供稿:网友
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/javascripts/default.js
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表