我是d3的新手.我有这样的定义:
node = node.enter().append("circle")
.attr('id', function(d){ return d.id; })
.attr("class", "node")
.on('mouseover', mouseover_node)
.on("click", nodeClick);
Run Code Online (Sandbox Code Playgroud)
现在在函数nodeClick中我想访问具有特殊id的节点(或循环).我正在寻找一些我可以使用的东西:
for(var i=0;i<maxId;i++) {
d3.select(the node with id = i).do....
Run Code Online (Sandbox Code Playgroud)
有人知道我怎么做吗?
一些如何在java html源代码的进程中间受到这种不需要的转换的影响.例如现在我有:
<body topmargin="0" leftmargin="0" bgcolor="#000000"> <center><p>
Run Code Online (Sandbox Code Playgroud)
我想将此字符串转换回原来的字符串.