In the trilateration of wireless sensor networks, to overcome the affection of localization error caused by the selection of beacon nodes, a selective strategy of beacon nodes based on the angle information is proposed in this paper. By the comparative analysis of angle, we can determine the topology shape of the selected beacon nodes and the position relationship with unknown node, so that unknown nodes can choose three beacon nodes which are the most accurate to execute trilateration. Simulation results demonstrate that the localization error of unknown nodes is reduced greatly by the proposed method.