Javascript İ;在xlink中包含Svg文件:href=";#获取数据
单击发布数据时,Svg文件中的这段代码#P082195,我需要使用javascipt获取数据并直接发送到asp文件Javascript İ;在xlink中包含Svg文件:href=";#获取数据,javascript,ajax,Javascript,Ajax,单击发布数据时,Svg文件中的这段代码#P082195,我需要使用javascipt获取数据并直接发送到asp文件 <a xlink:href="#P082195"> 元素addEventListener(“单击”,函数(str) { 如果(str==“”) { document.getElementById('svg-container')。innerHTML=xhr.responseText; 返回; } if(window.XMLHttpRe
<a xlink:href="#P082195">
元素addEventListener(“单击”,函数(str)
{
如果(str==“”)
{
document.getElementById('svg-container')。innerHTML=xhr.responseText;
返回;
}
if(window.XMLHttpRequest)
{//IE7+、Firefox、Chrome、Opera、Safari的代码
xmlhttp=新的XMLHttpRequest();
}
其他的
{//IE6、IE5的代码
xmlhttp=新的ActiveXObject(“Microsoft.xmlhttp”);
}
open(“GET”、“getsvg.asp?#”+str,true);
xmlhttp.send();
}
你能帮我一下吗?我被困在这里了
<script>
elem.addEventListener("click", function(str)
{
if (str=="")
{
document.getElementById('svg-container').innerHTML = xhr.responseText;
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","getsvg.asp?#"+str,true);
xmlhttp.send();
}
</script>