Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/456.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么';Internet Explorer是否显示外来对象?_Javascript_Internet Explorer_D3.js - Fatal编程技术网

Javascript 为什么';Internet Explorer是否显示外来对象?

Javascript 为什么';Internet Explorer是否显示外来对象?,javascript,internet-explorer,d3.js,Javascript,Internet Explorer,D3.js,我正在使用d3js创建一棵树,需要插入foreignObject,但Internet Explorer没有显示它 node.append('g:foreignObject') .attr('width', rectWidth) .attr('height', rectHeight) .attr('x', rectWidth / -2) .attr('y', rectHeight / -2) .append('xhtml:p') .html(func

我正在使用d3js创建一棵树,需要插入foreignObject,但Internet Explorer没有显示它

node.append('g:foreignObject')
    .attr('width', rectWidth)
    .attr('height', rectHeight)
    .attr('x', rectWidth / -2)
    .attr('y', rectHeight / -2)
    .append('xhtml:p')
    .html(function(d) {
        return d.name;
    });

它不受支持(看起来也不受支持),请参阅。

您可以在SVG上使用HTML并适当定位。我是该链接中的“Rick Godwin”注释。这让我很震惊,微软IE团队怎么会在这么长时间里如此愚蠢。我的座右铭是“IE是外物!”。