The real estate mogul's comment comes after Mr Khan said he would have to visit his US-based counterparts in New York and Chicago before next January in case Mr Trump is elected president.
The latest controversy from Mr Trump is one of a series of U-turns over the last week, which include his sudden decision to raise taxes for the rich and encourage states to raise the minimum wage.
Mr Trump, who is the presumptive Republican nominee after Ted Cruz and John Kasich quit the candidacy last week, caused international outrage when he called for a temporary ban of all Muslims entering the US on account of their supposed terrorist links.
He then threatened to scrap further investment in his golf and tourism empire in Scotland after MPs debated banning the Republican from entering the UK due to his racist rhetoric.
Speaking to the New York Times on how the ban would affect Sadiq Khan, Mr Trump said there would "always be exceptions".
He said he was "happy" that voters had elected the Labour MP for Tooting, and that it would be a "very good thing" if Mr Khan is successful in the role.
Mr Trump has also irked citizens and politicians when he said there were areas of London that were "no-go areas" which were "so radicalised that the police are afraid for their own lives".
Mr Khan, a practising Muslim, swept to victory in London with 1.3 million votes on Saturday.
He said he was glad that people had chosen "hope over fear and unity over division", referring to his conservative rival Zac Goldsmith who suggested Mr Khan gave "oxygen" to Muslim extremism.
Mr Trump responded: "I was happy to see that. I think it's a very good thing, and I hope he does a very good job because frankly that would be very, very good."
"Because I think if he does a great job, it will really - you lead by example, always lead by example. If he does a good job, and frankly if he does a great job, that would be a terrific thing," Mr Trump added.
The presdiential candidate is likely to face a battle for the White House against Democrat Hillary Clinton following the Republican convention in July.
Mr Khan told Time magazine he was confident Americans would not choose Mr Trump as their next president when they go to vote in November.
"I want to go to America to meet with and engage with American mayors," he said. "If Donald Trump becomes the president I'll be stopped from going there by virtue of my faith, which means I can't engage with American mayors and swap ideas."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies