The attraction between them will remain the same regardless of their position in this universe (as long as the gravitational constant remains same, which it does).
However, the net force acting on either of the bodies will change if taken to the moon. This is because the gravitational pull of the moon is weaker than that of the earth.