如何删除D3.js中的属性?


70

我可以在D3.JS中删除属性吗?我已经使用添加了它.attr("disabled", "disabled"),现在我正在寻找类似于jQuery的东西来.removeAttr("disabled", "disabled");再次将其删除。对<button>和有用<option>。我试过使用,.remove()但是会删除整个对象而不是属性。

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.