Patent ID: 8500466

Claim:
An electronic apparatus with a plug, comprising a housing opened with a port, a plug passing through the port, and a circuit board located inside the housing and electrically connected to the plug, wherein a locking mechanism is disposed between the plug and the housing, the locking mechanism is configured to lock the plug when the plug is in a state of extending out of the port, and the locking mechanism automatically becomes ineffective when the plug is impacted by a force in a direction in which the plug retracts into the port; wherein the locking mechanism comprises elastic ribs fixedly connected to the plug and extending towards a sidewall of the housing, a positioning projection fixedly disposed at ends of the elastic ribs away from the plug, and a button fixedly connected to the positioning projection, wherein, the sidewall is opened with a sliding way in parallel with the direction in which the plug retracts into or extends out of the port, and the button extends out of the sliding way and is capable of sliding in the sliding way; and the sidewall is further opened with a positioning slot, the end of the positioning projection away from the plug is disposed with gradually descending slope surfaces, the positioning projection is inserted inside the positioning slot, and the slope surfaces are held against an inner wall of the positioning slot.