私は愚かな問題で立ち往生しています。以下は、domの計算されたスタイルを取得するための私のコードです。それはFireFox、さらにはIE(驚いた)でもうまく動作します!しかし、chrome v17では遅すぎます(20倍遅くなります)。問題を回避する方法は?
getCurrentStyle = function(el)
{
if (el.currentStyle)
return el.currentStyle;
else if (window.getComputedStyle)
return document.defaultView.getComputedStyle(el,null);
return null;
}
助けてください!