The idea is a knee jerk reaction. Once you actually put serious thought behind the idea, this idea has a HOST of serious problems.
First off, how will these teachers know there is a shooting in progress? Depending on the logistics of the school, there can easily exists situations where teachers can't hear the gunshots (my high school was a campus with 12 different separate buildings). And even if/when they do hear the shots they might not know exactly where those shots are coming from. Then factor in that the teachers are most likely out-gunned as said assailant will have an Assault Rifle which in a massacre setting is a SUPERIOR weapon to a handgun (long hallways, open spaces, places to take cover and/or set up an ambush and/or fortify your position, etc).
Then there is the matter of actual authority and tactics.
What happens if the gunman seizes a room full of students and demands that the teachers with the guns come out and put the guns down or else the gunman will start killing kids, one kid for every twenty seconds the teachers don't come out. Are the teachers now obligated to sacrifice their lives for these kids and acquiesce to the demands?
What if the teacher shoots at the gunman, misses, and kills a kid? Is that teacher now liable for that death? What if the teacher freezes? Is that teacher now liable for whoever dies because he failed to prevent said death. In fact, as a teacher in this situation there is almost no way you can come out of a school shooting looking good. No matter how many kids are killed critics will always say that you didn't act fast enough and that X amount of dead kids is your fault.