Mr. Romney sought to use his moment before a prime-time audience of tens of millions to escape the corner Mr. Obama and his allies have painted him into, depicting him as an uncompromising adherent to policies that have been tried before. He instead turned the focus on his opponent’s record.

“You’ve been president four years. You’ve been president four years,” Mr. Romney said at one point. He ticked through a list of promises he said Mr. Obama had not lived up to, and said, “Middle-income families are being crushed.”

Neither candidate delivered that knockout blow or devastating line that each side was hoping for. Still, style points went to Mr. Romney, who continually and methodically pressed his critique of Mr. Obama. The president at times acted more as if he were addressing reporters in the Rose Garden than beating back a challenger intent on taking his job.

Throughout the evening, Mr. Romney escaped Mr. Obama’s attempts to pin him down on which deductions he would eliminate in his tax proposals.

“At some point,” Mr. Obama said, “the American people have to ask themselves: Is the reason Governor Romney is keeping all these plans secret, is it because they’re going to be too good? Because middle-class families benefit too much? No.”

Mr. Obama criticized Mr. Romney for his answer to a primary debate question last year in which he joined his fellow Republicans in saying he would not accept a budget deal allowing $1 of tax increases for every $10 in spending cuts. “Now, if you take such an unbalanced approach,” Mr. Obama said, “then that means you are going to be gutting our investments in schools and education.”

Mr. Romney said his position on the tax-for-revenue deal was because of the state of the economy, not necessarily ideology. “I’m not going to raise taxes on anyone because when the economy’s growing slow like this, when we’re in recession, you shouldn’t raise taxes on anyone,” he said.