Dynamical phase transition of Bose-Einstein condensates (BEC) in double-well trap with external periodic modulation applied to the interaction term is investigated in this paper. Particularly, phase transition to chaos is studied. It is found that, when resonance between the modulation frequency and the natural frequency of the system happens, the system turns to instability (chaos) at certain values of the parameters. In the chaotic region, distribution of particles is random, and the average of population difference fluctuates around zero. Especially, chaos can be manifested by the entanglement entropy. In the chaotic zone, both of the average entanglement entropies approach to their maxima.