[Edge]。→、、
element が属性を1つでも持っているか否かを Boolean で返します。
element | Element。 |
---|
HTML:
<SPAN id=IdTest>[SPAN要素<B>[B要素]</B>]</SPAN>
JavaScript:
D=IdTest.hasAttributes(); //=[boolean]:true E=IdTest.firstElementChild; //SPAN要素の子要素を取得する。 D=E.hasAttributes(); //=[boolean]:false