我在我的index.html
文件中有这个,但它没有显示我想添加的段落D3
<!DOCTYPE html>
<html>
<head>
<title> D3 page template </title>
<script type="text/javascript" src = "d3/d3.v3.js"></script>
</head>
<body>
<script type="text/javascript">
d3.select("body").append("p").text("new paragraph!");
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我引用的路径D3.js
应该是正确的,因为如果我在浏览器中执行inspect元素,我可以单击D3
链接,它会将我带到它的源代码.