Liquid crystal phase-only spatial light modulator(Phase-only LCSLM) can modulate the phase of light wave fast and accurately.Utilizing this characteristic,an effective phase retrieval method is put forward.By changing input parameters of phase-only LCSLM,the phase of the incident light wave in front of the measured object can be adjusted easily.The spatial frequency spectrum intensity distribution of the object light wave is recorded after each phase modulation.For increasing the accuracy of measurement,an idea of inner and outer GS iterative algorithm is also presented to inverse the phase information from the intensity data.The experiment for the phase of one-dimensional phase grating being retrieved proves the validity of this method.