使用div显示包含d3.js的html页面

时间:2017-01-30 13:18:53

标签: javascript jquery html css d3.js

据我所知,可以使用以下代码在另一个html的div中显示html文件:

index.hml

bool ShowParent(string parentName)

但是,我尝试加载的 chart1.html 包含以下d3.js相关代码。

<script> 
  $(function() {
    $("#includedChart1").load("chart1.html"); 
  }); 
</script> 

<body>
  <div id="includedChart1"></div>
</body>

当index.html显示其他html文件时,当我加载上面的代码时,它只显示空白页面而没有别的。

失败的原因是什么?

0 个答案:

没有答案