SVG Document.head属性r返回一个对象,该对象包含有关文档标题的信息。
用法:
var objRef = document.head
返回值:该属性返回一个对象,该对象包含有关文档标题的信息。
范例1:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
<svg width="350" height="500"
xmlns="http://www.w3.org/2000/svg">
<script>
console.log(document.head)
</script>
</svg>
</body>
</html>
输出:
范例2:
HTML
<!DOCTYPE html>
<html>
<head>
<title>GeeksforGeeks</title>
</head>
<body>
<svg width="350" height="500"
xmlns="http://www.w3.org/2000/svg">
<script>
console.log(document.head)
</script>
</svg>
</body>
</html>
输出:
相关用法
- SVG RectElement.rx属性用法及代码示例
- SVG RectElement.height属性用法及代码示例
- SVG CircleElement.r属性用法及代码示例
- SVG CircleElement.cy属性用法及代码示例
- SVG EllipseElement.rx属性用法及代码示例
- SVG EllipseElement.ry属性用法及代码示例
- SVG EllipseElement.cy属性用法及代码示例
- SVG LinearGradientElement.x1属性用法及代码示例
- SVG LinearGradientElement.x2属性用法及代码示例
- SVG namespaceURI属性用法及代码示例
- SVG RectElement.x属性用法及代码示例
- SVG UseElement.x属性用法及代码示例
- SVG UseElement.y属性用法及代码示例
- SVG UseElement.height属性用法及代码示例
- SVG UseElement.width属性用法及代码示例
- SVG RectElement.y属性用法及代码示例
- SVG TextPathElement.startOffset属性用法及代码示例
- SVG LineElement.y1属性用法及代码示例
- SVG LineElement.y2属性用法及代码示例
- SVG EllipseElement.cx属性用法及代码示例
注:本文由纯净天空筛选整理自taran910大神的英文原创作品 SVG Document.head Property。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。