The operator Cψ,φ that maps a holomorphic function f to ψ*f。φis called weighted composition operator,where ψ is a holomorphic function and φ is a holomorphic map. A weighted composition operator defined on the Hardy-Hilbert space H2(Bn) and weighted Bergman spaces A2α(Bn) in the unit ball of n-dimension complex space is invertible if and only if both ψ and 1/ψ are bounded and φ is an automorphism. In addition, the spectral of a weighted composition operator is given in this paper where $\varphi$ is an elliptic automorphism and the eigenvalues of φ at its fixed point are all rational rotation.