President Reagan told cheering Fairfax County students yesterday that he will oppose attempts to reduce funding for the nation's space shuttle program because of last week's explosion of the Challenger, and said teachers "are still on the list to go up."

After an upbeat speech at Thomas Jefferson High School in Annandale, Reagan made a pledge of continued funding that went beyond his previous statements of support for the space shuttle program.

"I don't think that it is going to have any effect with regard to, for example, withdrawing of funds or not, and certainly, I will oppose and fight any effort to do that," Reagan said in answer to a student's question about the effect of the accident on funding for the National Aeronautics and Space Administration.

In a speech delayed from last week because of the Challenger explosion, Reagan spoke to 1,500 enthusiastic students and local officials who packed the banner-draped school gymnasium. Among those on the platform with him were U.S. Education Secretary William J. Bennett and Judith M. Garcia, a teacher at Jefferson and one of 10 finalists for the teacher-in-space berth that went to Christa McAuliffe.

The president reiterated his support for sending nonastronauts into space, despite criticism that the missions are too dangerous. "Space belongs to all of us, and to the people," Reagan said. "You bet teachers are still on the list to go up."

Reagan pressed for his Strategic Defense Initiative -- the "Star Wars" missile defense -- promising to "do everything within my power to move forward with research and testing of a high-tech nonnuclear defensive system, so that the world in which you raise your children in will be safe and secure and free."

Reagan employed the Challenger shuttle disaster to reiterate his call for prayer in public schools. Responding to a student's question, Reagan said Americans across the nation "stopped and prayed" after hearing the news, "yet you young people in the schools were denied that privilege to pray in your own schools."

The four students who questioned Reagan were picked at random from students who applied, and their questions were read to the White House advance team Thursday night, school officials said.

Presidential security aides were at the school two hours before it opened to inspect the building.

The theme of the president's message was that "each of us has the same responsibility as the hero -- to live our lives with honor and dedication, to give 100 percent to the tasks before us . . . . "

"America is the A-team among nations," he declared, "bursting with energy, courage and determination . . . . We're charging full speed ahead."

There are two high schools under one roof at Thomas Jefferson, a regular school with just under 1,000 students, and a competitive admission school of science and technology that enrolls 400 ninth graders and 100 seniors. The science and technology school, a state magnet program, has received more than $1 million in donated equipment and services from area businesses, and its supporters cite it as a leading example of the kind of public-private partnership Reagan endorses.

In honor of the school's high-tech theme, Reagan gave Garcia what he said was the first model of a hypersonic aerospace plane now under development that will be able to fly anywhere on Earth in three hours.

The students had been urged by a school official to greet Reagan with "enthusiastic clapping and appropriate cheering," and they did. They greeted his speech with frequent applause, and laughed at his joking references to having known Thomas Jefferson.