HAMPTON, Va. — Hillary Clinton rebuked Donald J. Trump on Wednesday for proposing national security ideas that she argued would put America in greater danger and inspire more terrorist attacks.

The criticism comes as Mr. Trump is under fire for offering what Democrats and Republicans have called an off-key response to the massacre in Orlando, Fla.

After 49 people were killed in a gay nightclub by an American-born Islamic State sympathizer on Sunday morning, Mr. Trump expanded his proposed ban on Muslim immigration to include people coming from countries with a history of harming America. He also suggested that President Obama was appeasing the nation’s enemies.

During a round-table discussion Wednesday with military members and veterans in Hampton, Va., Mrs. Clinton argued that such notions were nonsense.