In this paper, a real-time iterative learning control (ILC) approach for a nonlinear continuous-time system using recurrent neural networks (RNNs) with time-varying weights is presented. Two RNNs are utilized in the ILC system. One is used to approximate the nonlinear system and another is used to mimic the desired system response. The ILC rule is obtained by combining the two RNNs to form a neural network control system. Also, a kind of iterative RNNs training algorithm is developed based on the two-dimensional (2-D) system theory. An RNN using the proposed 2-D training algorithm is able to approximate any trajectory to a very high degree of accuracy. Simulation results show that the proposed ILC approach is very efficient. The newly developed 2-D RNNs training algorithms provides a new dimension to the application of RNNs in a nonlinear continuous-time system.