An antenna structure comprising: a metal housing, the metal housing comprising a front frame, a backboard, and a side frame, the side frame being positioned between the front frame and the backboard; wherein the side frame defines a slot adjacent to the backboard and extending towards the front frame, the front frame defines a groove, the groove is positioned between two ends of the slot, communicates with the slot, and extends to cut across the front frame, a first portion of the front frame positioned at a first side of the groove forms a first branch; a second portion of the front frame extending from a second side of the groove to one end of the slot forms a second branch; a switching circuit; a connecting portion; and a first feed source, the first feed source electrically connected to the first branch and the second branch through the connecting portion, and the first branch being connected to the backboard through the switching circuit to be grounded; wherein the side frame comprises an end portion, a first side portion, and a second side portion, the first side portion and the second side portion are respectively connected to two ends of the end portion, the end portion, the first side portion, and the second side portion all connect to the front frame and the backboard, the slot is defined at the end portion and extends to the first side portion and the second side portion; wherein the connecting portion comprises a first connecting section, a second connecting section, a third connecting section, and a fourth connecting section; one end of the first connecting section is electrically connected to the first feed source and another end of the first connecting section extends along a direction parallel to the end portion towards the first side portion; one end of the second connecting section is perpendicularly connected to the end of the first connecting section away from the first feed source and another end of the second connecting section extends along a direction parallel to the first side portion towards the end portion until the second connecting section connects to the portion of the first branch adjacent to the groove; one end of the third connecting section is connected to a junction of the first connecting section and the first feed source and another end of the third connecting section extends along a direction parallel to the second connecting section away from the end portion; one end of the fourth connecting section is perpendicularly connected to the end of the third connecting section away from the first feed source and another end of the fourth connecting section extends along a direction parallel to the first connecting section towards the second side portion until the fourth connecting section connects to the second branch. a metal housing, the metal housing comprising a front frame, a backboard, and a side frame, the side frame being positioned between the front frame and the backboard; wherein the side frame defines a slot adjacent to the backboard and extending towards the front frame, the front frame defines a groove, the groove is positioned between two ends of the slot, communicates with the slot, and extends to cut across the front frame, a first portion of the front frame positioned at a first side of the groove forms a first branch; a second portion of the front frame extending from a second side of the groove to one end of the slot forms a second branch; a switching circuit; a connecting portion; and a first feed source, the first feed source electrically connected to the first branch and the second branch through the connecting portion, and the first branch being connected to the backboard through the switching circuit to be grounded; wherein the side frame comprises an end portion, a first side portion, and a second side portion, the first side portion and the second side portion are respectively connected to two ends of the end portion, the end portion, the first side portion, and the second side portion all connect to the front frame and the backboard, the slot is defined at the end portion and extends to the first side portion and the second side portion; wherein the connecting portion comprises a first connecting section, a second connecting section, a third connecting section, and a fourth connecting section; one end of the first connecting section is electrically connected to the first feed source and another end of the first connecting section extends along a direction parallel to the end portion towards the first side portion; one end of the second connecting section is perpendicularly connected to the end of the first connecting section away from the first feed source and another end of the second connecting section extends along a direction parallel to the first side portion towards the end portion until the second connecting section connects to the portion of the first branch adjacent to the groove; one end of the third connecting section is connected to a junction of the first connecting section and the first feed source and another end of the third connecting section extends along a direction parallel to the second connecting section away from the end portion; one end of the fourth connecting section is perpendicularly connected to the end of the third connecting section away from the first feed source and another end of the fourth connecting section extends along a direction parallel to the first connecting section towards the second side portion until the fourth connecting section connects to the second branch.