A bracket device (24, 24'), comprising: a bracket (38, 38') having a side plate and an end plate connected to the side plate; a mounting member arranged on the end plate of the bracket (38, 38'); a pivoting member penetrating through a portion of a moving area; and a locking member comprising a base part, a protrusion section being formed on and bent relative to the base part, wherein the locking member is rotatable relative to the bracket (38, 38') through the pivoting member; wherein, the bracket (38, 38') further has a pair of ear parts connected to the side plate, the pair of ear parts provide the moving area; wherein, the moving area is an elongated hole or an elongated groove, and is arranged in a longitudinal direction for allowing the locking member to be longitudinally moved between a first position and a second position relative to the bracket (38, 38'); the pivoting member penetrates through the protrusion section of the locking member and the moving area of the pair of ear parts. wherein the end plate is substantially perpendicularly connected to the side plate, the locking member further comprises a locking part, a first distance is defined between the locking part of the locking member and the end plate of the bracket (38, 38') when the locking member is located at the first position relative to the bracket (38, 38'); a second distance is defined between the locking part of the locking member and the end plate of the bracket (38, 38') when the locking member is located at the second position relative to the bracket (38, 38'): further comprising an elastic member (70, 70') configured to provide an elastic force to the locking member, wherein the locking member is located at a predetermined position in response to the elastic force of the elastic member (70, 70'). a bracket (38, 38') having a side plate and an end plate connected to the side plate; a mounting member arranged on the end plate of the bracket (38, 38'); a pivoting member penetrating through a portion of a moving area; and a locking member comprising a base part, a protrusion section being formed on and bent relative to the base part, wherein the locking member is rotatable relative to the bracket (38, 38') through the pivoting member; wherein, the bracket (38, 38') further has a pair of ear parts connected to the side plate, the pair of ear parts provide the moving area; wherein, the moving area is an elongated hole or an elongated groove, and is arranged in a longitudinal direction for allowing the locking member to be longitudinally moved between a first position and a second position relative to the bracket (38, 38'); the pivoting member penetrates through the protrusion section of the locking member and the moving area of the pair of ear parts. wherein the end plate is substantially perpendicularly connected to the side plate, the locking member further comprises a locking part, a first distance is defined between the locking part of the locking member and the end plate of the bracket (38, 38') when the locking member is located at the first position relative to the bracket (38, 38'); a second distance is defined between the locking part of the locking member and the end plate of the bracket (38, 38') when the locking member is located at the second position relative to the bracket (38, 38'): further comprising an elastic member (70, 70') configured to provide an elastic force to the locking member, wherein the locking member is located at a predetermined position in response to the elastic force of the elastic member (70, 70').