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

时间:2006-12-27    点击:123   
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
使用Modello编写JavaScript类
获取Javscript执行函数名称的方法
Javascript开发包大全整理
用js重建星际争霸
完美解决JS中汉字显示乱码问题(已解决)
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved