I found both of them works in my test:
.on(\"mouseover\", function() { d3.select(this) .select(\"text\")
If you look at the HTML you get, you'll see something like:
...
and
..which are both legal in SVG, but using attr when you need style could trip you up if you use it for something else.