TAMPA, Fla. — President Trump brought a message of a booming economy with him to Central Florida on Tuesday evening. He boasted about his administration’s economic accomplishments at an event at a local high school, where a supporter cheerily praised him as “the best president.” And he signed a piece of work force legislation, holding up a scrawled piece of paper for all to see.

But the tone changed when Mr. Trump traveled to a “Make America Great Again” rally at a fairground auditorium in Tampa.

The president, in a feisty but unfocused mood, stood before a group of supporters, called himself “the most popular person in the history of the Republican Party” — a debunked claim — and took aim at his usual list of piñatas, boogeymen and political targets.

“Those people,” Mr. Trump said of his perceived detractors, “how they have gotten us wrong. And yet on Election Day, people were asking, ‘Where did these people come from?’”