I found both of them works in my test:
.on("mouseover",
function() {
d3.select(this)
.select("text")
.style("fill","red");
})
or
.on("mouseover",
function() {
d3.select(this)
.select("text")
.attr("fill","red");
})