A clamping bracket for holding mobile devices comprising: a base casing; a clamping mechanism including first and second clamping members (21, 22) located on opposite sides of the base casing with the first and the second clamping members (21, 22) sticking out from the respective sides of the base casing; a driving mechanism including a first sliding member connected to the first clamping member and slidingly connected to the base casing, and a transmission member connected to the base casing; and through the transmission member's own movement, the transmission member drives the first sliding member causing the first clamping member to move toward the second clamping member for gripping a mobile device or to move away from the second clamping member for releasing the mobile device; and an anchor mechanism including a first anchor member connected to the transmission member and a second anchor member connected to the base casing, the first anchor member being in an unlock state when separating from the second anchor member, and the first anchor member being in a lock state when engaging with the second anchor member, the second anchor member containing a plurality of plug-in positions for the first anchor member to engage with; whereby the first anchor member, when switching from the lock state to the unlock state, disengages from a current plug-in position to drive the transmission member to move the first clamping member, and whereby the first anchor member, when switching from the unlock state to the lock state, becomes immobile thereby causing the transmission member to stop the first clamping member, wherein the transmission member includes a gear rotatably connected to the base casing and wherein a first clamping gear rack, located on one side of the first sliding member, contains gear teeth meshed with the gear of said transmission member; wherein the driving mechanism further comprises a second sliding member connected to the second clamping member and slidingly connected to the base casing, and through the transmission member's own movement, the transmission member drives the second sliding member causing the second clamping member to move toward or away from the first clamping member; wherein a second clamping gear rack located on one side of the second sliding member contains gear teeth meshed with the gear, and wherein the first clamping gear rack and the second clamping gear rack are correspondingly set up such that the gear located therebetween is configured for moving the first clamping gear rack and the second clamping gear rack in opposite directions. a base casing; a clamping mechanism including first and second clamping members (21, 22) located on opposite sides of the base casing with the first and the second clamping members (21, 22) sticking out from the respective sides of the base casing; a driving mechanism including a first sliding member connected to the first clamping member and slidingly connected to the base casing, and a transmission member connected to the base casing; and through the transmission member's own movement, the transmission member drives the first sliding member causing the first clamping member to move toward the second clamping member for gripping a mobile device or to move away from the second clamping member for releasing the mobile device; and an anchor mechanism including a first anchor member connected to the transmission member and a second anchor member connected to the base casing, the first anchor member being in an unlock state when separating from the second anchor member, and the first anchor member being in a lock state when engaging with the second anchor member, the second anchor member containing a plurality of plug-in positions for the first anchor member to engage with; whereby the first anchor member, when switching from the lock state to the unlock state, disengages from a current plug-in position to drive the transmission member to move the first clamping member, and whereby the first anchor member, when switching from the unlock state to the lock state, becomes immobile thereby causing the transmission member to stop the first clamping member, wherein the transmission member includes a gear rotatably connected to the base casing and wherein a first clamping gear rack, located on one side of the first sliding member, contains gear teeth meshed with the gear of said transmission member; wherein the driving mechanism further comprises a second sliding member connected to the second clamping member and slidingly connected to the base casing, and through the transmission member's own movement, the transmission member drives the second sliding member causing the second clamping member to move toward or away from the first clamping member; wherein a second clamping gear rack located on one side of the second sliding member contains gear teeth meshed with the gear, and wherein the first clamping gear rack and the second clamping gear rack are correspondingly set up such that the gear located therebetween is configured for moving the first clamping gear rack and the second clamping gear rack in opposite directions.