The paper proposes a model for the teaching of the web page automation classification based on the K-nearest neighbor algorithm.The model trums the word vectors to the numeric vectors according to vector space model,then uses K-nearest neighbor algorithm to finish the web page classification.The experiments show that the correct classification rate is improved.