In this work, a novel iterative least squares method is proposed to approximate nonlinear functions with continuous piecewise linear (CPWL) functions, where the continuity is guaranteed by constrained least squares. A typical least-squares-based method for CPWL fitting consists of two major steps: to perform least squares for a fixed set of breakpoints (i.e. for a specific partition of function domain), and to update breakpoints to reduce the overall fitting error. The proposed method aims to improve the existing CPWL method, the one with canonical representation, by modifying both major steps. Instead of performing ordinary least squares with canonical representation, partitioned least squares and constrained least squares are successively performed to reduce the computational complexity. For the update of breakpoints, an iterative procedure is proposed, where gradient descent with momentum method is employed to improve the convergence characteristics. The advantages of proposed method are illustrated using illustrative examples.