2015年5月15日金曜日

JavaScriptでhtmlのDOMエレメントのクラス名を得るには?

JavaScriptでhtmlのDOMエレメントのクラス名を得るには?

document.getElementById('divId').className.split(/\s+/);

参考
http://stackoverflow.com/questions/1227286/get-class-list-for-element-with-jquery

0 件のコメント:

コメントを投稿