Javascript 如何关闭</来源>;要由单独的svg文件读取的标记
嗨,我希望我能用视频创建一个svg,但是我不能在线关闭标签,收集svg并从一个单独的文件中读取,它给出了错误 XML读取错误:标签不匹配。应为:Javascript 如何关闭</来源>;要由单独的svg文件读取的标记,javascript,html,xml,svg,Javascript,Html,Xml,Svg,嗨,我希望我能用视频创建一个svg,但是我不能在线关闭标签,收集svg并从一个单独的文件中读取,它给出了错误 XML读取错误:标签不匹配。应为: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Documento sin título</title> <script type="text/javascript&
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
<script type="text/javascript">
function scripenvivo(){
//var e=document.getElementById('hola');
//var textnode = document.createTextNode("</source>");
//e.appendChild(textnode);
var sor =document.getElementById('soyunsvgconvideo').innerHTML
alert(sor)
}
</script>
</head>
<body>
<div Id="soyunsvgconvideo">
<svg class="img-responsive" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" preserveAspectRatio="none" viewBox="0 0 1470 800 ">
<foreignObject id="i" requiredExtensions="http://www.w3.org/1999/xhtml " width="640" x="500" y="300" height="352" >
<g xmlns="http://www.w3.org/1999/xhtml">
<video autoplay="autoplay" loop="loop" muted="muted" preload="auto" class="a64" width="640" height="352">
<source x="300" y="225" src="https://animacionesweb.online/videos/City-3134.mp4" type="video/mp4">
</video>
</g>
</foreignObject>
</svg>
</div>
<input type="button" onclick=scripenvivo() value ="pulsame"></imput>
</body>
</html>```
辛蒂图罗文件
函数scripenvivo(){
//var e=document.getElementById('hola');
//var textnode=document.createTextNode(“”);
//e、 appendChild(textnode);
var sor=document.getElementById('soyunsvgconvideo').innerHTML
警报(sor)
}
```
您好,但在警报中如何显示