The measure, however, would not allow any of the funding to be used for arming teachers or other school personnel. The White House said the legislation would be improved by lifting that restriction.
"The best way to keep our students and teachers safe is to give them the tools and the training to recognize the warning signs to prevent violence from ever entering our school grounds, and this bill aims to do just that," said Republican Representative John Rutherford of Florida, a former sheriff who sponsored the school safety bill.
It was not yet clear when the Senate would take up the House-passed bill.
Already awaiting action in the Senate is a bill to strengthen existing background checks of gun purchasers. It enjoys broad bipartisan support but has not been scheduled for debate.
Congressional aides said there were ongoing discussions about possibly folding the school safety and background check bills into a massive government funding bill that Congress aims to pass by March 23.
Eleven organizations, including some gun control and law enforcement groups, on Wednesday sent a letter to Senate Majority Leader Mitch McConnell, a Republican, and Senate Democratic Leader Chuck Schumer urging passage this month of the background checks bill.
Neither the House nor Senate bills address many of the gun control initiatives backed by students, teachers and families of shooting victims at the Florida school.
In emotional testimony before the Senate Judiciary Committee, Katherine Posada, a teacher at the school, recounted the horror she experienced the day of the shooting and urged Congress to ban assault-style weapons like the AR-15 rifle used by Nikolas Cruz, who has been charged in the murders.
"Some of the victims were shot through doors, or even through walls – a knife can't do that," Posada said. "How many innocent lives could have been saved if these weapons of war weren't so readily available?"
Since the Florida shooting, the Republican-led Congress and Trump's administration have considered a variety of measures to curb gun violence while trying to avoid upsetting the powerful National Rifle Association lobby group or threatening the right to bear arms enshrined in the U.S. Constitution's Second Amendment.
Protesters with signs targeting the NRA and advocating an assault rifle ban filled the hearing room in the Senate on Wednesday and occasionally applauded as some Democrats on the panel spoke about enacting stricter gun laws.
Meanwhile, the No. 2 official at the Federal Bureau of Investigation told lawmakers in testimony Wednesday that his agency dropped the ball by mishandling several tips about Cruz before the shooting, and said reforms were underway.
"The FBI could have and should have done more to investigate the information it was provided prior to the shooting," Acting Deputy Director David Bowdich said.
--CNBC's Chloe Aiello contributed to this report.