Yes, you simply put the commas inside the selector string rather than passing separate strings:
svg.selectAll(".class1, circle, #id2")
I am assuming that "class1" is a css class, "circle" is a tag name, and "id2" is an ID attribute value.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…