CONGRESS had demanded that the president, in order to continue aiding El Salvador, certify that the junta is committed to human rights, reforms and elections. Yesterday the president so certified. We think he did the right and necessary thing. It's evident, however, that the situation in El Salvador is confused and dismal enough that, had a president wanted to, he might have marshaled grounds to go the other way.

The trouble lies not in the decision Mr. Reagan made but in the nature of the hurdle Congress forced him to jump. Many people in and out of Congress fear that the junta is a loser, unable to tame the extreme right sufficiently to fight the extreme left effectively. They could turn out to be right. But probably most congressmen who voted to set up the certification procedure did not mean that the president should take it literally and use it to cut off the junta. Rather, they surely meant to be giving the president at once a way to push the junta harder and an incentive to do so. Now that Mr. Reagan has certified the aid, however, some of them are feeling aggrieved.

They might better inquire more rigorously into what it is they mean to do. It is well to press the administration to be more attentive to rights, reforms and elections. This administration has needed pressing. It is misleading, however, to proceed as though El Salvador were a fresh issue on which the United States had the luxury of making an up-or- down judgment every six months, as the law stipulates, on the basis of the junta's rights record.

A little history: burned by Anastasio Somoza's replacement by a Cuba-oriented regime in Nicaragua, Jimmy Carter undertook a bold, preemptive political intervention in El Salvador. Ronald Reagan is following basically the same policy. Call it a grit-your-teeth policy: to support a reformist junta, with a lot of bad eggs in and around it, in order to avoid a Somoza-Sandinista choice. For critics to narrow their focus to the teeth-gritting without considering the policy's larger aims is shallow and unfair.

For people who can't take the junta, the honest response is not to say the junta is--surprise--beset and flawed, but rather to make the case that it's acceptable to the United States if El Salvador goes the Cuban way. Perhaps this will have to be said of Guatemala, burdened by a regime that seems beyond the pale even of the conservative Ronald Reagan, let alone of the liberal Jimmy Carter. El Salvador, however, is another story: the place where both presidents decided it was worth hanging on.