An antenna structure (200a, 200b) 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; the side frame defining a slot, the front frame defining a first gap and a second gap, the first gap communicating with a first end of the slot and extending to cut across the front frame, the second gap positioned between the first gap and a second end of the slot and extending to cut across the front frame; the metal housing being divided into at least a first branch and a second branch by the slot, the first gap, and the second gap; the portion of the front frame between the first gap and the second gap forming the first branch; the portion of the front frame between the second gap and the second end forming the second branch; the second branch being grounded at the second end; a first feed source (31, 33), the first feed source (31, 33) electrically connected to the first branch; and a first switching circuit, one end of the first switching circuit electrically connected to the first branch and another end of the first switching circuit being 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 at least defined at the end portion, is adjacent to the backboard and extends to an edge of the front frame; wherein the antenna structure further comprises a first electronic element positioned in a receiving space adjacent to the first side portion and a radiator, the radiator is positioned adjacent to the first gap and is spaced apart from the first electronic element, the radiator is positioned adjacent to the first electronic element and the first side portion, and extends along a direction parallel to the end portion towards the second side portion until the radiator passes over the first electronic element and further extends along a direction parallel to the end portion towards the second side portion. 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; the side frame defining a slot, the front frame defining a first gap and a second gap, the first gap communicating with a first end of the slot and extending to cut across the front frame, the second gap positioned between the first gap and a second end of the slot and extending to cut across the front frame; the metal housing being divided into at least a first branch and a second branch by the slot, the first gap, and the second gap; the portion of the front frame between the first gap and the second gap forming the first branch; the portion of the front frame between the second gap and the second end forming the second branch; the second branch being grounded at the second end; a first feed source (31, 33), the first feed source (31, 33) electrically connected to the first branch; and a first switching circuit, one end of the first switching circuit electrically connected to the first branch and another end of the first switching circuit being 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 at least defined at the end portion, is adjacent to the backboard and extends to an edge of the front frame; wherein the antenna structure further comprises a first electronic element positioned in a receiving space adjacent to the first side portion and a radiator, the radiator is positioned adjacent to the first gap and is spaced apart from the first electronic element, the radiator is positioned adjacent to the first electronic element and the first side portion, and extends along a direction parallel to the end portion towards the second side portion until the radiator passes over the first electronic element and further extends along a direction parallel to the end portion towards the second side portion.