President Carter pledged today to increase defense spending if he wins a second term and countered attacks on his defense strategy by declaring that American military strength will remain unsurpassed.

On his first campaign trip since winning the Democratic nomination, Carter promised to keep pace with any arms race the Soviet Union forces upon the United States, but also said he would seek to go beyond SALT II in arms reduction talks in order to build genuine peace.

His audience at the American Legion convention here applauded whenever Carter proclaimed that America is strong and will build its defense, and sat silent at mention of arms control.

White House officials denied that Carter's speech the day after Ronald Reagan addressed this convention was a rebuttal to the Republican challenger, who has made a week-long series of attacks on Carter defense policy.

Reagan's name was not mentioned, but the president frequently criticized those who would seek "simple" solutions. This characterization of Reagan's policies is popular at the White House.

"Our goals are security, honor and peace. Those are the victories we seek -- for ourselves, for our children and for their children," Carter said. "Those can be won, but not by nostalgic or wishful thinking, and not by bravado."

Carter said that arms alone cannot win security. "Our strength in arms must be matched by creative, responsible and courageous diplomacy," he said.

For the first time, Carter discussed his new directive on nuclear targeting guidelines.

"Our strategy, now modernized to take account of Soviet planning and attitudes, must leave them no room for the illusion that they can obtain advantage over the United States through the use of force," Carter said.

He called the targeting change "carefully considered, logical and evolutionary," with the aim of helping to prevent a nuclear conflict. The new doctrine sets a range of targets, instead of targeting Soviet cities for massive destruction and relying on that threat to deter aggression.

Carter won the presidency four years ago promising to reduce defense spending. Transformed in office, he now faces an opponent who demands greater defense spending without detailing what he would buy with the extra dollars.

Carter's posture now is that he reversed an eight-year downward trend in defense spending by his Republican predecessors.

He promised that real growth in defense spending will continue "in the years ahead."

Carter, who put on a legionnaire's cap and pointed out that his father had been an American Legion member before him, stressed the complexity of choices confronting a president.

"The decisions we made today, some of them highly secret, will affect the risk of nuclear war well into the next century," Carter said.

He reviewed some of his major defense decisions, in each case proclaiming that the right choice had been made.

"We could have spent more money, but we would not have spent more wisely," the president said. "We could have placed our chips on the B1 bomber -- that would have been in service quickly and obsolete almost as quickly."

"I decided instead to accelerate the development of the [air-launched] cruise missiles," Carter said. "Because of their accuracy and their ability to penetrate Soviet defense, they represent a far more effective deterrent than the B1 bomber. We needed -- and we are getting -- the right answer for the long haul. Technological developments will prove this answer to be the right one."

Another available choice was to resume production of land-based missiles, Carter said, but these would have been just as vulnerable as the existing missiles, which the administration says are now at the point of being impossible to defend against improved Soviet missiles.

Carter chose to go ahead with the mobile missile system called MX to replace the old ground-based missiles. "The MX will be ready to strengthen our strategic defense just when we need that added strength," Carter said.

The MX will begin to become operational by 1986 and will be in full operation at the end of the decade.

Until it is ready, U.S. deterrence will rely on bombers and submarine-based missiles.

Carter claimed that his administration put the Trident missile and submarine programs "back on track." The first Trident submarine is scheduled to have sea trials soon.

The president's speech was received politely but he aroused no fervor among the legionnaires. He rarely strained for applause, and complete silence greeted his statements that an active diplomacy must accompany arms in winning a true peace and that disarmament is an important goal.

"It does no good to increase . . . destructive power in search of a temporary edge or in pursuit of the illusion of absolute superiority," Carter said. "Chasing either advantage can undercut the stability and assured deterrence that is our real goal and need.

"To limit strategic nuclear weapons, as the SALT treaties do, is not to reduce our strength but to reduce the danger that misunderstanding and miscalculation could lead to global catastrophe," Carter said.

The audience got its only laugh when House Speaker Thomas (Tip) O'Neill Jr., receiving an award from the Legion, said how pleased he was that he would soon be followed to the podium by "my good friend Jimmy Roosevelt." He quickly explained he meant Jimmy Carter.