xxxxxxxxxx
<html>
<head>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/d3@2.10.3/d3.v2.js"></script>
</head>
<body>
<script type="text/javascript">
var svg = d3.select("body").append("svg")
.attr("width", 100)
.attr("height", 100);
svg.append("foreignObject")
.attr("width", 100)
.attr("height", 100)
.append("xhtml:body")
.html("<form><input type=checkbox id=check /></form>")
.on("click", function(d, i){
console.log(svg.select("#check").node().checked);
});
</script>
</body>
</html>
Modified http://mbostock.github.com/d3/d3.js to a secure url
https://mbostock.github.com/d3/d3.js