A memristor is a kind of nonlinear two-port circuit element with memory characteristics, whose resistance value is subject to being controlled by the voltage or current on both its ends, and thus it has broad application prospects. At present, most of the memristor application research is based on the change of resistance and memory characteristics, which involves how to make the memristor change according to the desired trajectory. Aiming at this problem, a resistance tracking control method of memristors is proposed based on iterative learning controls. This method is based on the general mathematical model of the voltage-controlled memristor, and uses the derivative of the error between the actual resistance and the desired resistance to continuously modify the control voltage, making the current control voltage gradually approach the desired control voltage. Furthermore, the convergence of the proposed algorithm is proved theoretically, and the convergence conditions of the algorithm are given. Theoretical analysis and simulation results show that the proposed algorithm can make the resistance of the memristor completely track the desired resistance in a finite time interval with the increase of iterations. This method can realize the design of the controller when the mathematical model of the memristor is unknown, and the structure of the controller is simple. The proposed method can lay a theoretical foundation for the application research on memristors in the future.