SVG_text.一般属性测试

1、测试代码

<?xml version="1.0" encoding="UTF-8"?>
<svg width="1000" height="800" viewBox="-500 -200 1000 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cge="http://iec.ch/TC57/2005/SVG-schema#" xmlns:hzsvg="http://holleygrid.cn/svg">

    <script type="text/javascript" >
    <![CDATA[
    <!--

    // ZC: 动态的在SVG中绘制一个矩形
    function DynamicCreateRect(_x, _y, _width, _height, _stroke, _strokeWidth, _fill)
    {
        var eleSvg = document.getElementsByTagName("svg")[0];
        var strNS = eleSvg.getAttribute("xmlns");

        var rect = document.createElementNS(strNS, "rect");
        eleSvg.appendChild(rect);

        rect.setAttribute("x", _x);
        rect.setAttribute("y", _y);
        rect.setAttribute("width",  _width);
        rect.setAttribute("height", _height);

        rect.setAttribute("stroke", _stroke);
        rect.setAttribute("stroke-width", _strokeWidth);
        rect.setAttribute("fill", _fill);
    }

        window.onload = function(evt)
        {
        var text01 = document.getElementById("text01");
        var text02 = document.getElementById("text02");
        var text03 = document.getElementById("text03");

        var tspan0201 = document.getElementById("tspan0201");
        var tspan0202 = document.getElementById("tspan0202");
        var tspan0301 = document.getElementById("tspan0301");

        var rt01 = text01.getBBox();
        var rt02 = text02.getBBox();
        var rt03 = text03.getBBox();

        var rt0201 = tspan0201.getBBox();
        var rt0202 = tspan0202.getBBox();
        var rt0301 = tspan0301.getBBox();

        // ZC: 说明 隐藏的 <text/>照样也是绘制出来了,只是肉眼看不到
        console.log(rt01.x + ", " + rt01.y + ", " + rt01.width + ", " + rt01.height);
        console.log("");

        // ZC: <text/>的BBox()矩形 和 <tspan/>的BBox()矩形 在数值上是一样的 - (1)
        console.log(rt02.x + ", " + rt02.y + ", " + rt02.width + ", " + rt02.height);
        console.log(rt0201.x + ", " + rt0201.y + ", " + rt0201.width + ", " + rt0201.height);
        console.log(rt0202.x + ", " + rt0202.y + ", " + rt0202.width + ", " + rt0202.height);
        console.log("");

        // ZC: <text/>的BBox()矩形 和 <tspan/>的BBox()矩形 在数值上是一样的 - (2)
        console.log(rt03.x + ", " + rt03.y + ", " + rt03.width + ", " + rt03.height);
        console.log(rt0301.x + ", " + rt0301.y + ", " + rt0301.width + ", " + rt0301.height);
        console.log("");

        DynamicCreateRect(-200, 400, 200, 21, "red", "1", "none");

//*
        // ZC: <text/>没有 innerText属性
        var testText01 = document.getElementById("testText01");
        for (z in testText01)
            console.log(z + " ==> " + testText01[z]);
        console.log("");

        var testText01 = document.getElementById("testText01");
            console.log("testText01.childNodes.length : " + testText01.childNodes.length);
        testText01.innerHTML = "";// ZC: 这个时候
            console.log("testText01.childNodes.length : " + testText01.childNodes.length);
        testText01.innerHTML = "A";
            console.log("testText01.childNodes.length : " + testText01.childNodes.length + " , " + testText01.childNodes[0].nodeType);
//*/
        };
    -->
    ]]>
    </script>

<!-- 这里可以看出 tspan的dy是针对上一个tspan而言的(相信dx也是同样的原理) -->
<text x="-400" y="-150" >
    <tspan x="-400">测试1,测试2,测试3,测试4,测试5,</tspan>
    <tspan x="-400" dy="21">测试6,测试7,测试8,测试9,测试10。</tspan>
    <tspan x="-400" dy="21">abcdefg.1234567890.</tspan>
</text>

<!-- 貌似上面说的也不全对...可以理解成:tspan的dy是针对上一个 文本段落而言的(dx应该也是同样的原理) -->
<text x="0" y="-150" >
    测试1,测试2,测试3,测试4,测试5,
    <tspan x="0" dy="21">测试6,测试7,测试8,测试9,测试10。</tspan>
    <tspan x="0" dy="21">abcdefg.1234567890.</tspan>
</text>

<text id="text01" x="-400" y="-100" visibility="hidden">1234567890</text>

<!-- tspan不设置 dx&dy或x&y属性的话,就和一般的 text元素看上去一样 -->
<text id="text02" x="-400" y="-50" >
    <tspan id="tspan0201">测试1,测试2,测试3,测试4,测试5,</tspan>
    <tspan id="tspan0202">测试6,测试7,测试8,测试9,测试10。</tspan>
</text>
<text id="text03" x="-400" y="50" >
    测试1,测试2,测试3,测试4,测试5,
    <tspan id="tspan0301">测试6,测试7,测试8,测试9,测试10。</tspan>
</text>

<rect x="0" y="0" width="100" height="1" stroke="none" fill="blue"/>

<text x="-100" y="200" id="text01" >
    <tspan id="text0101">Whatever text you want</tspan>
    <tspan id="text0102" dx="0" dy="21">here. 1234567890.1234567890</tspan>
</text>

<text id="testText01" />

</svg>
<?DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"?>

2、网页运行效果

3、控制台输出

Text_test_Z01.svg:46 -400, -117, 93.828125, 21
Text_test_Z01.svg:47
Text_test_Z01.svg:50 -401, -67, 588.9375, 21
Text_test_Z01.svg:51 -401, -67, 588.9375, 21
Text_test_Z01.svg:52 -401, -67, 588.9375, 21
Text_test_Z01.svg:53
Text_test_Z01.svg:56 -401, 33, 588.9375, 21
Text_test_Z01.svg:57 -401, 33, 588.9375, 21
Text_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 ==> 2
Text_test_Z01.svg:68 LENGTHADJUST_SPACING ==> 1
Text_test_Z01.svg:68 LENGTHADJUST_UNKNOWN ==> 0
Text_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 ==> -1
Text_test_Z01.svg:68 onabort ==> null
Text_test_Z01.svg:68 onblur ==> null
Text_test_Z01.svg:68 oncancel ==> null
Text_test_Z01.svg:68 oncanplay ==> null
Text_test_Z01.svg:68 oncanplaythrough ==> null
Text_test_Z01.svg:68 onchange ==> null
Text_test_Z01.svg:68 onclick ==> null
Text_test_Z01.svg:68 onclose ==> null
Text_test_Z01.svg:68 oncontextmenu ==> null
Text_test_Z01.svg:68 oncuechange ==> null
Text_test_Z01.svg:68 ondblclick ==> null
Text_test_Z01.svg:68 ondrag ==> null
Text_test_Z01.svg:68 ondragend ==> null
Text_test_Z01.svg:68 ondragenter ==> null
Text_test_Z01.svg:68 ondragleave ==> null
Text_test_Z01.svg:68 ondragover ==> null
Text_test_Z01.svg:68 ondragstart ==> null
Text_test_Z01.svg:68 ondrop ==> null
Text_test_Z01.svg:68 ondurationchange ==> null
Text_test_Z01.svg:68 onemptied ==> null
Text_test_Z01.svg:68 onended ==> null
Text_test_Z01.svg:68 onerror ==> null
Text_test_Z01.svg:68 onfocus ==> null
Text_test_Z01.svg:68 oninput ==> null
Text_test_Z01.svg:68 oninvalid ==> null
Text_test_Z01.svg:68 onkeydown ==> null
Text_test_Z01.svg:68 onkeypress ==> null
Text_test_Z01.svg:68 onkeyup ==> null
Text_test_Z01.svg:68 onload ==> null
Text_test_Z01.svg:68 onloadeddata ==> null
Text_test_Z01.svg:68 onloadedmetadata ==> null
Text_test_Z01.svg:68 onloadstart ==> null
Text_test_Z01.svg:68 onmousedown ==> null
Text_test_Z01.svg:68 onmouseenter ==> null
Text_test_Z01.svg:68 onmouseleave ==> null
Text_test_Z01.svg:68 onmousemove ==> null
Text_test_Z01.svg:68 onmouseout ==> null
Text_test_Z01.svg:68 onmouseover ==> null
Text_test_Z01.svg:68 onmouseup ==> null
Text_test_Z01.svg:68 onmousewheel ==> null
Text_test_Z01.svg:68 onpause ==> null
Text_test_Z01.svg:68 onplay ==> null
Text_test_Z01.svg:68 onplaying ==> null
Text_test_Z01.svg:68 onprogress ==> null
Text_test_Z01.svg:68 onratechange ==> null
Text_test_Z01.svg:68 onreset ==> null
Text_test_Z01.svg:68 onresize ==> null
Text_test_Z01.svg:68 onscroll ==> null
Text_test_Z01.svg:68 onseeked ==> null
Text_test_Z01.svg:68 onseeking ==> null
Text_test_Z01.svg:68 onselect ==> null
Text_test_Z01.svg:68 onstalled ==> null
Text_test_Z01.svg:68 onsubmit ==> null
Text_test_Z01.svg:68 onsuspend ==> null
Text_test_Z01.svg:68 ontimeupdate ==> null
Text_test_Z01.svg:68 ontoggle ==> null
Text_test_Z01.svg:68 onvolumechange ==> null
Text_test_Z01.svg:68 onwaiting ==> null
Text_test_Z01.svg:68 onwheel ==> null
Text_test_Z01.svg:68 onauxclick ==> null
Text_test_Z01.svg:68 ongotpointercapture ==> null
Text_test_Z01.svg:68 onlostpointercapture ==> null
Text_test_Z01.svg:68 onpointerdown ==> null
Text_test_Z01.svg:68 onpointermove ==> null
Text_test_Z01.svg:68 onpointerup ==> null
Text_test_Z01.svg:68 onpointercancel ==> null
Text_test_Z01.svg:68 onpointerover ==> null
Text_test_Z01.svg:68 onpointerout ==> null
Text_test_Z01.svg:68 onpointerenter ==> null
Text_test_Z01.svg:68 onpointerleave ==> null
Text_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/svg
Text_test_Z01.svg:68 prefix ==> null
Text_test_Z01.svg:68 localName ==> text
Text_test_Z01.svg:68 tagName ==> text
Text_test_Z01.svg:68 id ==> testText01
Text_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 ==> null
Text_test_Z01.svg:68 assignedSlot ==> null
Text_test_Z01.svg:68 innerHTML ==>
Text_test_Z01.svg:68 outerHTML ==> <text xmlns="http://www.w3.org/2000/svg" id="testText01"/>
Text_test_Z01.svg:68 scrollTop ==> 0
Text_test_Z01.svg:68 scrollLeft ==> 0
Text_test_Z01.svg:68 scrollWidth ==> 0
Text_test_Z01.svg:68 scrollHeight ==> 0
Text_test_Z01.svg:68 clientTop ==> 0
Text_test_Z01.svg:68 clientLeft ==> 0
Text_test_Z01.svg:68 clientWidth ==> 0
Text_test_Z01.svg:68 clientHeight ==> 0
Text_test_Z01.svg:68 onbeforecopy ==> null
Text_test_Z01.svg:68 onbeforecut ==> null
Text_test_Z01.svg:68 onbeforepaste ==> null
Text_test_Z01.svg:68 oncopy ==> null
Text_test_Z01.svg:68 oncut ==> null
Text_test_Z01.svg:68 onpaste ==> null
Text_test_Z01.svg:68 onsearch ==> null
Text_test_Z01.svg:68 onselectstart ==> null
Text_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 ==> null
Text_test_Z01.svg:68 lastElementChild ==> null
Text_test_Z01.svg:68 childElementCount ==> 0
Text_test_Z01.svg:68 onwebkitfullscreenchange ==> null
Text_test_Z01.svg:68 onwebkitfullscreenerror ==> null
Text_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 ==> 1
Text_test_Z01.svg:68 ATTRIBUTE_NODE ==> 2
Text_test_Z01.svg:68 TEXT_NODE ==> 3
Text_test_Z01.svg:68 CDATA_SECTION_NODE ==> 4
Text_test_Z01.svg:68 ENTITY_REFERENCE_NODE ==> 5
Text_test_Z01.svg:68 ENTITY_NODE ==> 6
Text_test_Z01.svg:68 PROCESSING_INSTRUCTION_NODE ==> 7
Text_test_Z01.svg:68 COMMENT_NODE ==> 8
Text_test_Z01.svg:68 DOCUMENT_NODE ==> 9
Text_test_Z01.svg:68 DOCUMENT_TYPE_NODE ==> 10
Text_test_Z01.svg:68 DOCUMENT_FRAGMENT_NODE ==> 11
Text_test_Z01.svg:68 NOTATION_NODE ==> 12
Text_test_Z01.svg:68 DOCUMENT_POSITION_DISCONNECTED ==> 1
Text_test_Z01.svg:68 DOCUMENT_POSITION_PRECEDING ==> 2
Text_test_Z01.svg:68 DOCUMENT_POSITION_FOLLOWING ==> 4
Text_test_Z01.svg:68 DOCUMENT_POSITION_CONTAINS ==> 8
Text_test_Z01.svg:68 DOCUMENT_POSITION_CONTAINED_BY ==> 16
Text_test_Z01.svg:68 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC ==> 32
Text_test_Z01.svg:68 nodeType ==> 1
Text_test_Z01.svg:68 nodeName ==> text
Text_test_Z01.svg:68 baseURI ==> file:///E:/Project_SVG/Text_test_Z01.svg
Text_test_Z01.svg:68 isConnected ==> true
Text_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 ==> null
Text_test_Z01.svg:68 lastChild ==> null
Text_test_Z01.svg:68 previousSibling ==> [object Text]
Text_test_Z01.svg:68 nextSibling ==> [object Text]
Text_test_Z01.svg:68 nodeValue ==> null
Text_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 : 0
Text_test_Z01.svg:74 testText01.childNodes.length : 0
Text_test_Z01.svg:76 testText01.childNodes.length : 1 , 3

4、

5、

原文地址:https://www.cnblogs.com/h5skill/p/9537597.html

时间: 2025-01-17 14:21:25

SVG_text.一般属性测试的相关文章

各浏览器Iframe对contentWindow、contentDocument、document及frames属性测试

  Iframe易于嵌套及管理页面,但经常遇到跨域.父子页面访问问题,对于子页面访问父页面可以兼容性地通过window.Top或window.Parent或window.frameElement等操作,但对于标题中四个对象,一直没有完整测试过,故买个苦力,分享给大家. 结论: 1. 就浏览器而言(横向),IE8/IE9/360安全浏览器全部支持: 2. 就属性而言(纵向),contentWindow和frames所有浏览器都支持,其次是contentDocument,document支持性最差:

Android转载四:(布局)ImageView scaleType属性测试

原始地址: http://blog.csdn.net/xilibi2003/article/details/6628668 使用ImageView时经常会用到scaleType属性,如: <ImageView android:layout_width="50dp" android:layout_height="50dp"  android:scaleType="matrix" android:src="@drawable/samp

【干货】如何使用C++11实现C#属性概念设计

目录(原创博客,版权所有,转载请注明出处 http://www.cnblogs.com/feng-sc) 1.概述 2.C#属性的概念  2.1.简单示例代码介绍C#中的属性  2.2.C++实现效果与C#效果对比(熟悉C#属性读者可从此小节开始) 3.如何使用C++11实现C#属性的概念模型 3.1.property_rw介绍 3.2.property_r.property_w介绍 3.3.完整属性测试代码介绍 4.总结 1.概述 本人对“C++实现C#属性概念”的研究决定并非一时冲动,而是原

安全测试指南

测试方法 1.Web应用安全测试 1.1. Web应用安全测试概述 Web应用安全测试只侧重于评估Web应用的安全性.这个过程包括主动分析应用程序的所有弱点.技术缺陷和漏洞.任何被发现的安全问题连同影响评估.缓解建议或者技术方案一起提交给系统所有者. 1.2. 什么是OWASP测试方法 测试模型 测试人员:执行测试活动的人 工具和方法:本测试指南项目的核心 应用:黑盒测试的对象 测试阶段 阶段1. 被动模式: 阶段2.  主动模式: 2.信息收集测试 2.1 搜索引擎信息收集 2.2 Web服务

[html5] 学习笔记-表单新增的元素与属性(续)

本节主要讲解表单新增元素的controls属性.placeholder属性.List属性.Autocomplete属性.Pattern属性.SelectionDirection属性.Indeterminate属性.Image提交按钮的宽高属性. 1.controls属性 在html5中,可以在标签内部放置一个表单元素,并且通过该标签的controls属性来访问该表单元素. 1 <body> 2 <script> 3 function setValue(){ 4 var label

Perl 学习笔记-文件测试

1.文件测试操作符 针对文件和目录的测试操作符: -r/-w/-x/-o: 文件或目录, 对有效的(负责运行这个程序的)用户或组来说是可读/写/执行/拥有 的; 这些测试位会查看文件的权限位, 以此判断哪些操作是允许的, 如果系统使用访问控制列表(ACL), 那么测试就按列表进行判断, 但是只是测试结果只是操作系统的看法, 但是受实际情况限制, 运行的事未必可行, 如空文件运行运行, 但是并没有什么意义. -R/-W/-X/-O: 文件或目录, 对实际的用户或组来说是可读/写/执行/拥有 的;

内省及反射属性复制案例

1.内省 1 /** 2 * 测试内省(可以得到从父类继承的get.set方法) 3 * 4 * @author feigu 5 * 6 */ 7 public class TestIntrospector { 8 public static void main(String[] args) { 9 try { 10 BeanInfo info = Introspector.getBeanInfo(Person.class); 11 // 得到属性描述符 12 PropertyDescripto

Spring.NET 中对于测试支持的示例

第一,增加相应程序集的引用. 在测试项目中增加对于 NUnit 和 Spring.Testing.NUnit 程序集的引用. 第二,在项目中增加一个测试类,这个测试类必须从 Spring.Testing.NUnit.AbstractDependencyInjectionSpringContextTests 派生,这个基类提供了 Spring 的支持. 第三,需要重载 ConfigLocations 属性,提供配置信息的来源.基类会负责从中获取 Spring 的配置信息. 第四,定义需要注入的属性

&lt;转&gt;如何测试大型ERP软件?

大型ERP软件是一个在企业范围内部应用的.高度集成的软件,且操作频繁,数据在各业务系统之间高度共享.那么针对大型ERP软件的特点,我们应该怎么测试呢?要使用怎样的测试方法?需要什么样的测试人员?....这些都是我们在测试时需要考虑的问题. 大型ERP软件测试方法: 一.升级项目 规范测试流程.提高测试效率 测试人员尽早参与:由于业务流程复杂,测试人员越尽早熟悉业务需求,越有助于更好的了解业务,了解功能流程,方便全面的设计测试用例: 严格规范测试流程:由于测试工作本身处于被动状态,存在很多随意性和