An elementary school guard in China injured 39 people in a knife attack on Thursday with many children among the victims, a state office and media reported.