1、测试代码
2、网页运行效果
3、控制台输出
Text_test_Z01.svg:46 -400, -117, 93.828125, 21Text_test_Z01.svg:47 Text_test_Z01.svg:50 -401, -67, 588.9375, 21Text_test_Z01.svg:51 -401, -67, 588.9375, 21Text_test_Z01.svg:52 -401, -67, 588.9375, 21Text_test_Z01.svg:53 Text_test_Z01.svg:56 -401, 33, 588.9375, 21Text_test_Z01.svg:57 -401, 33, 588.9375, 21Text_test_Z01.svg:58 Text_test_Z01.svg:68 x ==> [object SVGAnimatedLengthList]Text_test_Z01.svg:68 y ==> [object SVGAnimatedLengthList]Text_test_Z01.svg:68 dx ==> [object SVGAnimatedLengthList]Text_test_Z01.svg:68 dy ==> [object SVGAnimatedLengthList]Text_test_Z01.svg:68 rotate ==> [object SVGAnimatedNumberList]Text_test_Z01.svg:68 LENGTHADJUST_SPACINGANDGLYPHS ==> 2Text_test_Z01.svg:68 LENGTHADJUST_SPACING ==> 1Text_test_Z01.svg:68 LENGTHADJUST_UNKNOWN ==> 0Text_test_Z01.svg:68 textLength ==> [object SVGAnimatedLength]Text_test_Z01.svg:68 lengthAdjust ==> [object SVGAnimatedEnumeration]Text_test_Z01.svg:68 getNumberOfChars ==> function getNumberOfChars() { [native code] }Text_test_Z01.svg:68 getComputedTextLength ==> function getComputedTextLength() { [native code] }Text_test_Z01.svg:68 getSubStringLength ==> function getSubStringLength() { [native code] }Text_test_Z01.svg:68 getStartPositionOfChar ==> function getStartPositionOfChar() { [native code] }Text_test_Z01.svg:68 getEndPositionOfChar ==> function getEndPositionOfChar() { [native code] }Text_test_Z01.svg:68 getExtentOfChar ==> function getExtentOfChar() { [native code] }Text_test_Z01.svg:68 getRotationOfChar ==> function getRotationOfChar() { [native code] }Text_test_Z01.svg:68 getCharNumAtPosition ==> function getCharNumAtPosition() { [native code] }Text_test_Z01.svg:68 selectSubString ==> function selectSubString() { [native code] }Text_test_Z01.svg:68 transform ==> [object SVGAnimatedTransformList]Text_test_Z01.svg:68 nearestViewportElement ==> [object SVGSVGElement]Text_test_Z01.svg:68 farthestViewportElement ==> [object SVGSVGElement]Text_test_Z01.svg:68 requiredExtensions ==> [object SVGStringList]Text_test_Z01.svg:68 systemLanguage ==> [object SVGStringList]Text_test_Z01.svg:68 getBBox ==> function getBBox() { [native code] }Text_test_Z01.svg:68 getCTM ==> function getCTM() { [native code] }Text_test_Z01.svg:68 getScreenCTM ==> function getScreenCTM() { [native code] }Text_test_Z01.svg:68 className ==> [object SVGAnimatedString]Text_test_Z01.svg:68 dataset ==> [object DOMStringMap]Text_test_Z01.svg:68 style ==> [object CSSStyleDeclaration]Text_test_Z01.svg:68 ownerSVGElement ==> [object SVGSVGElement]Text_test_Z01.svg:68 viewportElement ==> [object SVGSVGElement]Text_test_Z01.svg:68 tabIndex ==> -1Text_test_Z01.svg:68 onabort ==> nullText_test_Z01.svg:68 onblur ==> nullText_test_Z01.svg:68 oncancel ==> nullText_test_Z01.svg:68 oncanplay ==> nullText_test_Z01.svg:68 oncanplaythrough ==> nullText_test_Z01.svg:68 onchange ==> nullText_test_Z01.svg:68 onclick ==> nullText_test_Z01.svg:68 onclose ==> nullText_test_Z01.svg:68 oncontextmenu ==> nullText_test_Z01.svg:68 oncuechange ==> nullText_test_Z01.svg:68 ondblclick ==> nullText_test_Z01.svg:68 ondrag ==> nullText_test_Z01.svg:68 ondragend ==> nullText_test_Z01.svg:68 ondragenter ==> nullText_test_Z01.svg:68 ondragleave ==> nullText_test_Z01.svg:68 ondragover ==> nullText_test_Z01.svg:68 ondragstart ==> nullText_test_Z01.svg:68 ondrop ==> nullText_test_Z01.svg:68 ondurationchange ==> nullText_test_Z01.svg:68 onemptied ==> nullText_test_Z01.svg:68 onended ==> nullText_test_Z01.svg:68 onerror ==> nullText_test_Z01.svg:68 onfocus ==> nullText_test_Z01.svg:68 oninput ==> nullText_test_Z01.svg:68 oninvalid ==> nullText_test_Z01.svg:68 onkeydown ==> nullText_test_Z01.svg:68 onkeypress ==> nullText_test_Z01.svg:68 onkeyup ==> nullText_test_Z01.svg:68 onload ==> nullText_test_Z01.svg:68 onloadeddata ==> nullText_test_Z01.svg:68 onloadedmetadata ==> nullText_test_Z01.svg:68 onloadstart ==> nullText_test_Z01.svg:68 onmousedown ==> nullText_test_Z01.svg:68 onmouseenter ==> nullText_test_Z01.svg:68 onmouseleave ==> nullText_test_Z01.svg:68 onmousemove ==> nullText_test_Z01.svg:68 onmouseout ==> nullText_test_Z01.svg:68 onmouseover ==> nullText_test_Z01.svg:68 onmouseup ==> nullText_test_Z01.svg:68 onmousewheel ==> nullText_test_Z01.svg:68 onpause ==> nullText_test_Z01.svg:68 onplay ==> nullText_test_Z01.svg:68 onplaying ==> nullText_test_Z01.svg:68 onprogress ==> nullText_test_Z01.svg:68 onratechange ==> nullText_test_Z01.svg:68 onreset ==> nullText_test_Z01.svg:68 onresize ==> nullText_test_Z01.svg:68 onscroll ==> nullText_test_Z01.svg:68 onseeked ==> nullText_test_Z01.svg:68 onseeking ==> nullText_test_Z01.svg:68 onselect ==> nullText_test_Z01.svg:68 onstalled ==> nullText_test_Z01.svg:68 onsubmit ==> nullText_test_Z01.svg:68 onsuspend ==> nullText_test_Z01.svg:68 ontimeupdate ==> nullText_test_Z01.svg:68 ontoggle ==> nullText_test_Z01.svg:68 onvolumechange ==> nullText_test_Z01.svg:68 onwaiting ==> nullText_test_Z01.svg:68 onwheel ==> nullText_test_Z01.svg:68 onauxclick ==> nullText_test_Z01.svg:68 ongotpointercapture ==> nullText_test_Z01.svg:68 onlostpointercapture ==> nullText_test_Z01.svg:68 onpointerdown ==> nullText_test_Z01.svg:68 onpointermove ==> nullText_test_Z01.svg:68 onpointerup ==> nullText_test_Z01.svg:68 onpointercancel ==> nullText_test_Z01.svg:68 onpointerover ==> nullText_test_Z01.svg:68 onpointerout ==> nullText_test_Z01.svg:68 onpointerenter ==> nullText_test_Z01.svg:68 onpointerleave ==> nullText_test_Z01.svg:68 nonce ==> Text_test_Z01.svg:68 focus ==> function focus() { [native code] }Text_test_Z01.svg:68 blur ==> function blur() { [native code] }Text_test_Z01.svg:68 namespaceURI ==> http://www.w3.org/2000/svgText_test_Z01.svg:68 prefix ==> nullText_test_Z01.svg:68 localName ==> textText_test_Z01.svg:68 tagName ==> textText_test_Z01.svg:68 id ==> testText01Text_test_Z01.svg:68 classList ==> Text_test_Z01.svg:68 slot ==> Text_test_Z01.svg:68 attributes ==> [object NamedNodeMap]Text_test_Z01.svg:68 shadowRoot ==> nullText_test_Z01.svg:68 assignedSlot ==> nullText_test_Z01.svg:68 innerHTML ==> Text_test_Z01.svg:68 outerHTML ==>Text_test_Z01.svg:68 scrollTop ==> 0Text_test_Z01.svg:68 scrollLeft ==> 0Text_test_Z01.svg:68 scrollWidth ==> 0Text_test_Z01.svg:68 scrollHeight ==> 0Text_test_Z01.svg:68 clientTop ==> 0Text_test_Z01.svg:68 clientLeft ==> 0Text_test_Z01.svg:68 clientWidth ==> 0Text_test_Z01.svg:68 clientHeight ==> 0Text_test_Z01.svg:68 onbeforecopy ==> nullText_test_Z01.svg:68 onbeforecut ==> nullText_test_Z01.svg:68 onbeforepaste ==> nullText_test_Z01.svg:68 oncopy ==> nullText_test_Z01.svg:68 oncut ==> nullText_test_Z01.svg:68 onpaste ==> nullText_test_Z01.svg:68 onsearch ==> nullText_test_Z01.svg:68 onselectstart ==> nullText_test_Z01.svg:68 previousElementSibling ==> [object SVGTextElement]Text_test_Z01.svg:68 nextElementSibling ==> [object SVGRectElement]Text_test_Z01.svg:68 children ==> [object HTMLCollection]Text_test_Z01.svg:68 firstElementChild ==> nullText_test_Z01.svg:68 lastElementChild ==> nullText_test_Z01.svg:68 childElementCount ==> 0Text_test_Z01.svg:68 onwebkitfullscreenchange ==> nullText_test_Z01.svg:68 onwebkitfullscreenerror ==> nullText_test_Z01.svg:68 setPointerCapture ==> function setPointerCapture() { [native code] }Text_test_Z01.svg:68 releasePointerCapture ==> function releasePointerCapture() { [native code] }Text_test_Z01.svg:68 hasPointerCapture ==> function hasPointerCapture() { [native code] }Text_test_Z01.svg:68 hasAttributes ==> function hasAttributes() { [native code] }Text_test_Z01.svg:68 getAttributeNames ==> function getAttributeNames() { [native code] }Text_test_Z01.svg:68 getAttribute ==> function getAttribute() { [native code] }Text_test_Z01.svg:68 getAttributeNS ==> function getAttributeNS() { [native code] }Text_test_Z01.svg:68 setAttribute ==> function setAttribute() { [native code] }Text_test_Z01.svg:68 setAttributeNS ==> function setAttributeNS() { [native code] }Text_test_Z01.svg:68 removeAttribute ==> function removeAttribute() { [native code] }Text_test_Z01.svg:68 removeAttributeNS ==> function removeAttributeNS() { [native code] }Text_test_Z01.svg:68 hasAttribute ==> function hasAttribute() { [native code] }Text_test_Z01.svg:68 hasAttributeNS ==> function hasAttributeNS() { [native code] }Text_test_Z01.svg:68 getAttributeNode ==> function getAttributeNode() { [native code] }Text_test_Z01.svg:68 getAttributeNodeNS ==> function getAttributeNodeNS() { [native code] }Text_test_Z01.svg:68 setAttributeNode ==> function setAttributeNode() { [native code] }Text_test_Z01.svg:68 setAttributeNodeNS ==> function setAttributeNodeNS() { [native code] }Text_test_Z01.svg:68 removeAttributeNode ==> function removeAttributeNode() { [native code] }Text_test_Z01.svg:68 closest ==> function closest() { [native code] }Text_test_Z01.svg:68 matches ==> function matches() { [native code] }Text_test_Z01.svg:68 webkitMatchesSelector ==> function webkitMatchesSelector() { [native code] }Text_test_Z01.svg:68 attachShadow ==> function attachShadow() { [native code] }Text_test_Z01.svg:68 getElementsByTagName ==> function getElementsByTagName() { [native code] }Text_test_Z01.svg:68 getElementsByTagNameNS ==> function getElementsByTagNameNS() { [native code] }Text_test_Z01.svg:68 getElementsByClassName ==> function getElementsByClassName() { [native code] }Text_test_Z01.svg:68 insertAdjacentElement ==> function insertAdjacentElement() { [native code] }Text_test_Z01.svg:68 insertAdjacentText ==> function insertAdjacentText() { [native code] }Text_test_Z01.svg:68 insertAdjacentHTML ==> function insertAdjacentHTML() { [native code] }Text_test_Z01.svg:68 requestPointerLock ==> function requestPointerLock() { [native code] }Text_test_Z01.svg:68 getClientRects ==> function getClientRects() { [native code] }Text_test_Z01.svg:68 getBoundingClientRect ==> function getBoundingClientRect() { [native code] }Text_test_Z01.svg:68 scrollIntoView ==> function scrollIntoView() { [native code] }Text_test_Z01.svg:68 scrollIntoViewIfNeeded ==> function scrollIntoViewIfNeeded() { [native code] }Text_test_Z01.svg:68 animate ==> function animate() { [native code] }Text_test_Z01.svg:68 before ==> function before() { [native code] }Text_test_Z01.svg:68 after ==> function after() { [native code] }Text_test_Z01.svg:68 replaceWith ==> function replaceWith() { [native code] }Text_test_Z01.svg:68 remove ==> function remove() { [native code] }Text_test_Z01.svg:68 prepend ==> function prepend() { [native code] }Text_test_Z01.svg:68 append ==> function append() { [native code] }Text_test_Z01.svg:68 querySelector ==> function querySelector() { [native code] }Text_test_Z01.svg:68 querySelectorAll ==> function querySelectorAll() { [native code] }Text_test_Z01.svg:68 webkitRequestFullScreen ==> function webkitRequestFullScreen() { [native code] }Text_test_Z01.svg:68 webkitRequestFullscreen ==> function webkitRequestFullscreen() { [native code] }Text_test_Z01.svg:68 attributeStyleMap ==> [object StylePropertyMap]Text_test_Z01.svg:68 scroll ==> function scroll() { [native code] }Text_test_Z01.svg:68 scrollTo ==> function scrollTo() { [native code] }Text_test_Z01.svg:68 scrollBy ==> function scrollBy() { [native code] }Text_test_Z01.svg:68 createShadowRoot ==> function createShadowRoot() { [native code] }Text_test_Z01.svg:68 getDestinationInsertionPoints ==> function getDestinationInsertionPoints() { [native code] }Text_test_Z01.svg:68 computedStyleMap ==> function computedStyleMap() { [native code] }Text_test_Z01.svg:68 ELEMENT_NODE ==> 1Text_test_Z01.svg:68 ATTRIBUTE_NODE ==> 2Text_test_Z01.svg:68 TEXT_NODE ==> 3Text_test_Z01.svg:68 CDATA_SECTION_NODE ==> 4Text_test_Z01.svg:68 ENTITY_REFERENCE_NODE ==> 5Text_test_Z01.svg:68 ENTITY_NODE ==> 6Text_test_Z01.svg:68 PROCESSING_INSTRUCTION_NODE ==> 7Text_test_Z01.svg:68 COMMENT_NODE ==> 8Text_test_Z01.svg:68 DOCUMENT_NODE ==> 9Text_test_Z01.svg:68 DOCUMENT_TYPE_NODE ==> 10Text_test_Z01.svg:68 DOCUMENT_FRAGMENT_NODE ==> 11Text_test_Z01.svg:68 NOTATION_NODE ==> 12Text_test_Z01.svg:68 DOCUMENT_POSITION_DISCONNECTED ==> 1Text_test_Z01.svg:68 DOCUMENT_POSITION_PRECEDING ==> 2Text_test_Z01.svg:68 DOCUMENT_POSITION_FOLLOWING ==> 4Text_test_Z01.svg:68 DOCUMENT_POSITION_CONTAINS ==> 8Text_test_Z01.svg:68 DOCUMENT_POSITION_CONTAINED_BY ==> 16Text_test_Z01.svg:68 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC ==> 32Text_test_Z01.svg:68 nodeType ==> 1Text_test_Z01.svg:68 nodeName ==> textText_test_Z01.svg:68 baseURI ==> file:///E:/Project_SVG/Text_test_Z01.svgText_test_Z01.svg:68 isConnected ==> trueText_test_Z01.svg:68 ownerDocument ==> [object XMLDocument]Text_test_Z01.svg:68 parentNode ==> [object SVGSVGElement]Text_test_Z01.svg:68 parentElement ==> [object SVGSVGElement]Text_test_Z01.svg:68 childNodes ==> [object NodeList]Text_test_Z01.svg:68 firstChild ==> nullText_test_Z01.svg:68 lastChild ==> nullText_test_Z01.svg:68 previousSibling ==> [object Text]Text_test_Z01.svg:68 nextSibling ==> [object Text]Text_test_Z01.svg:68 nodeValue ==> nullText_test_Z01.svg:68 textContent ==> Text_test_Z01.svg:68 hasChildNodes ==> function hasChildNodes() { [native code] }Text_test_Z01.svg:68 getRootNode ==> function getRootNode() { [native code] }Text_test_Z01.svg:68 normalize ==> function normalize() { [native code] }Text_test_Z01.svg:68 cloneNode ==> function cloneNode() { [native code] }Text_test_Z01.svg:68 isEqualNode ==> function isEqualNode() { [native code] }Text_test_Z01.svg:68 isSameNode ==> function isSameNode() { [native code] }Text_test_Z01.svg:68 compareDocumentPosition ==> function compareDocumentPosition() { [native code] }Text_test_Z01.svg:68 contains ==> function contains() { [native code] }Text_test_Z01.svg:68 lookupPrefix ==> function lookupPrefix() { [native code] }Text_test_Z01.svg:68 lookupNamespaceURI ==> function lookupNamespaceURI() { [native code] }Text_test_Z01.svg:68 isDefaultNamespace ==> function isDefaultNamespace() { [native code] }Text_test_Z01.svg:68 insertBefore ==> function insertBefore() { [native code] }Text_test_Z01.svg:68 appendChild ==> function appendChild() { [native code] }Text_test_Z01.svg:68 replaceChild ==> function replaceChild() { [native code] }Text_test_Z01.svg:68 removeChild ==> function removeChild() { [native code] }Text_test_Z01.svg:68 addEventListener ==> function addEventListener() { [native code] }Text_test_Z01.svg:68 removeEventListener ==> function removeEventListener() { [native code] }Text_test_Z01.svg:68 dispatchEvent ==> function dispatchEvent() { [native code] }Text_test_Z01.svg:69 Text_test_Z01.svg:72 testText01.childNodes.length : 0Text_test_Z01.svg:74 testText01.childNodes.length : 0Text_test_Z01.svg:76 testText01.childNodes.length : 1 , 3
4、
5、