Disclosed are a connecting assembly, a door guardrail and a fence using the connecting assembly. The connecting assembly includes a first connector and a second connector, a transverse locking device and a longitudinal locking device are arranged between the first connector and the second connector, and the longitudinal locking device is capable of limiting relative movement of the first connector and the second connector in a transverse direction.