Turkey says it has captured a key Syrian border town as funerals are held for victims killed in the attack.