This paper addresses stability problem for a class of networked control systems (NCSs) with network attacks. As a network attack to control systems, denial-of-service attacks are fully taken into account in the NCSs modelling. Under the scenario that there exist denial-of-service attacks in the communication channel, a closed-loop system with an error function is provided for the studied NCSs, where the denial-of-service attacks are well considered. Then based on the above constructed system model, one sufficient condition is derived for ensuring the uniformly ultimately boundedness of the derived system under consideration, and the upper bound of the maximum allowable number of denial-of-service attack is obtained. Moreover, the celebrated time-delay system technology method is introduced to improve the result of the upper bound of the maximum allowable number of denial-of-service attack. Finally, one numerical example is given to show the effectiveness of the proposed method.