This paper is concerned with the reinforcement learning-based tracking control problem for a class of networked systems subject to denial-of-service (DoS) attacks. Taking the effects of DoS attacks into consideration, a novel value function is proposed, which considers the cost of the control input, external disturbance and tracking error. Then, using the structure of the value function, the tracking Bellman equation and Hamilton function are defined. By employing the Bellman optimality theory, the optimal control strategy and the game algebraic Riccati equation (GARE) are solved with the Hamilton function. Next, the desired tracking performance is guaranteed as the solution of the GARE is found. Furthermore, an attacks-based Q-learning algorithm is projected to find the solution to the optimal tracking problem without the system dynamics and the convergence of the Q-learning algorithm is given. Finally, the F-404 aircraft engine system is given to verify the effectiveness of the proposed control strategy.