In this paper, we report the growth of NaxCoO2 thin films by pulsed-laser deposition (PLD). It is shown that the concentration of sodium is very sensitive to the substrate temperature and the target-substrate distance due to the evaporation of sodium during the deposition. alpha prime-phase Na0.75CoO2 and gamma- phase Na0.71CoO2 thin films can be obtained with different conditions. Correspondingly, the surface morphology of the films changes from flake-like to particle-like. The temperature dependence of resistivity for the films prepared with the optimal condition shows metallic behavior, consistent with the data of NaxCoO2 single crystals. This work demonstrates that PLD is a promising technique to get high quality NaxCoO2 thin films.