A mousetrap, includes a box body with a motor, a trigger mechanism including a supporting rod/rods capable of moving up and down and supporting a top cover, and a support locking mechanism capable of rotating and supporting the supporting rod/rods, a transmission rod hinged to the front side plate having a clamping position matching with a locking part on the support locking mechanism; between the output shaft of the motor and the transmission rod, a cable for pulling the transmission rod to rotate is provided; a reset spring/springs for resetting the transmission rod is/are provided; and the top cover is provided with a pedal, both of them are respectively provided with a conductive contact piece which can be contacted to drive the motor when the pedal moves downwards by tread of a mouse, and separated by a return spring/springs.