When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
I recognize this too! Aaaagh!
Was it "My Teacher Flunked the Planet" by Bruce Coville? I haven't read that in 9 years but I still remember parts of it so distinctly... This was the second thing that popped into my mind, the first a kids' novel called "Under the Cat's Eye." I don't think you're looking for that one, though, or you would have mentioned the morphing-into-animals aspect, and there's no military in that one.
No, I don't think it was either one of those. I read a lot of Bruce Coville when I was younger, and it definitely wasn't one of his. And there were no aliens, or any sort of supernatural stuff involved, they were just being teleported and held. I remember the cover really well, it showed this girl with a surprised look looking into her empty classroom. I also remember this scene where she runs in there while the class is gone and switches backpacks around, trying to see if anyone would notice.

This was a sci-fi children's novel I read in the early 2000's. It involved a classroom of children that were unwittingly being experimented on by a local army base. They would disappear for long periods of time, and then reappear not knowing any time had passed. The protagonist was a young girl who had been sent to the office, and came back to find the classroom empty. Two things I remember really specifically was that the principal was described as a "Dragon Lady", because she had long, claw-like nails, and a janitor came several times to check their Speaker, because they were missing announcements due to being disappeared. It ends with the military men agreeing not to kill them for finding out their secret because they're just kids and no one will believe them.