A laser printer has a connection rod arranged therein. A front door has an
internal side provided with a front protrusion and a rear door has an
internal side provided with a rear protrusion. The connection rod has one
end provided with a switch. When at least one of the front and rear doors
is open, the connection rod is biased toward its other end by a spring
and the front protrusion does not abut against the connection rod's one
end. When the front and rear doors are both closed, the connection rod
slides toward its one end and the front protrusion abuts against the
connection rod's one end to turn on the switch.