1
我创建简单的SVG文件,并在Chrome和FF打开为什么document.title不适用于SVG?
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
width="4in" height="3in">
<g>
<title>Company sales by region</title>
</g>
</svg>
为什么document.title时返回 “”?
根据标准https://www.w3.org/TR/html51/dom.html#dom-tree-accessors
文件。 title [= value] 返回文档的标题,如HTML标题元素和SVG标题元素给出的那样。