On the basis of elementary transformation,we propose a new method for constructing a class of pure quantum codes [[n-i,2k-n+i,d-i]]2 and [[n+1,2k-n-1,d+1]]2 from a class of classical linear codes [n,k,d]2 that contain their dual codes.The construction process was based on the elementary algebra;the error-correcting performance of the quantum codes was analyzed according to the relationship between the parity-check matrix and the minimum distance of the classical linear codes;the encoding and decoding networks were constructed based on the stabilizer.The proposed method is simple,straightforward and easy to implement using a computer and other hardware system.The theoretical results showed that the method is practical for the construction of a class of quantum codes.