Donald Trump has pledged to act against radicalism on the internet and “defeat white supremacy” as the US president responded to the “evil” shootings in Texas and Ohio.