Browser Support All browsers except IE has a way to get the computed style. The way to do this is to use document.defaultView.getComputedStyle. Only IE has a way to get the cascaded style. This is done using element.currentStyle. All browsers... 続きを読む
jquery.jsを読み解く 第4回 jQueryライブラリ(770行目~1093行目) 2008年2月27日 山下英孝 1 2 3 0891: } else if ( elem.currentStyle ) { 0892: var camelCase = name.replace(/\-(\w)/g, function(all, letter){ 0893: return letter.toUpperCase(); 0894... 続きを読む
DHTML によるテーブル操作 Michael Wallent Microsoft Corporation May 3, 1999 日本語版最終更新日 1999 年 7 月 19 日 この記事は、MSDN Online Voices コラム"DHTML Dude" として掲載されたものです。 Soylent Green を覚えていますか? 「Soylent green は人... 続きを読む
Represents the cascaded format and style of the object as specified by global style sheets, inline styles, and HTML attributes.Members Table The following table lists the members exposed by the currentStyle object. 続きを読む
JavaScriptIE 7英語版正式リリースで確認。 var span = document.createElement('span'); alert(span.currentStyle); // null span.innerHTML='ABCDEFG'; alert(span.currentStyle); // 取得成功 Opera 9では、どちらでも取得できた。 続きを読む
またFirefoxは短縮形で取得しようとすると、設定していないプロパティにデフォルト値が入った状態で返ってくるので注意する。 getStyleValue( "div.hoge", "background" ) //Mozilla : rgb(17, 34, 51) none repeat scroll 0% 0% ルールを削除する function del... 続きを読む
IEで不透明度を変更するために下記のようなコードを書いたのですが、対象のエレメントのスタイルによって、不透明度が変わらない場合があることに気がつきました。(IE6、7共に) element.style.filter = 'alpha(opacity=50)'; だめだったのは、div要素に対して b... 続きを読む