Local officials say Islamic militants attacked a town in northeastern Nigeria, abducting more than 300 people, including women and children.