All 10 Democrats on the committee voted for the bill and all eight Republicans opposed it.
President Barack Obama called the vote "another step forward in our common effort to help reduce gun violence by advancing a bill that would reinstate and strengthen a ban on the sale of military-style assault weapons and set a 10-round limit for magazines."
"These weapons of war, when combined with high-capacity magazines, have one purpose: to inflict maximum damage as quickly as possible," the president said in a statement released by the White House. "They are designed for the battlefield, and they have no place on our streets, in our schools, or threatening our law enforcement officers."
Noting that the Senate advanced legislation on "three of the most important elements of my proposal to help reduce the epidemic of gun violence in this country," Obama called on the full Senate and the House "to vote on this bill, as well as the measures advanced in the past week that would impose serious penalties on anyone who buys a gun as part of a scheme to arm criminals, improve school safety, and help keep guns out of the hands of criminals, people with a severe mental illness, and others who shouldn't have them."
The Judiciary Committee vote came after debate during which freshman Sen. Ted Cruz, R-Texas, questioned whether the head of the committee, Sen. Diane Feinstein, D-Calif., properly understood the Second Amendment, The Washington Post reported.
"Would she deem it consistent with the Bill of Rights for Congress to engage in the same endeavor that we are contemplating doing to the Second Amendment, in the context of the First or Fourth Amendment?" Cruz asked.
"Let me just make a couple of points in response," Feinstein said. "One, I'm not a sixth grader. Senator, I've been on this committee for 20 years."
Feinstein said she had seen gun violence firsthand when San Francisco Mayor George Moscone and Supervisor Harvey Milk were killed and pointed out that the victims of the Dec. 14, 2012, massacre at Sandy Hook Elementary School in Newtown, Conn., "were dismembered."
"I'm not a lawyer, but after 20 years I've been up close and personal to the Constitution," she said.
Feinstein said the bill, which she sponsored, exempts 2,271 weapons.
"Isn't that enough for the people of the United States? Do they need a bazooka? Do they need other high-powered weapons that other people use in close combat?"
Feinstein later apologized to Cruz.
Cruz said he respected her opinion but gun control "should be driven by facts and the data and by the Constitution, not by passion."
The committee has approved four bills in the past week intended to limit gun violence.
Celebrity Couples of 2014 [PHOTOS]