We study the boundedness and compactness of weighted composition operators acting on weighted Bergman spaces and weighted Dirichlet spaces by using the corresponding Carleson measures. We give an estimate for the norm and the essential norm of weighted composition operators between weighted Bergman spaces as well as the composition operators between weighted Hilbert spaces.