An electronic device, comprising a first motor (110, 310, 410, 510), a second motor (120, 320, 420, 520), a touch sensor (130, 330, 430, 530), a pressure sensor, a processor (150, 350, 450, 550), and a switching circuit (160, 360, 460, 560), wherein the first motor is disposed at a first designated position of the electronic device, and the second motor is disposed at a second designated position of the electronic device; the pressure sensor is connected to the processor, and configured to generate a pressure value when sensing a pressing operation, and output the pressure value to the processor; the processor is connected to the switching circuit, and configured to generate a trigger signal when the pressure value exceeds a set pressure threshold, and output the trigger signal to the switching circuit; the touch sensor is configured to sense position data of the pressing operation and output the position data to the switching circuit; the switching circuit is connected to the first motor and the second motor respectively, and configured to select the first motor or the second motor to vibrate according to the trigger signal and the position data, wherein the switching circuit comprises a coprocessor (355, 455, 555), a D trigger (356, 456, 556), and a diverter switch (357, 457, 557); an input end of the D trigger is connected to an output end of the coprocessor, a clock end of the D trigger is connected to a control end of the processor, and an output end of the D trigger is connected to an enable end of the diverter switch; an input end of the diverter switch is connected to a control end of the processor, a first output end of the diverter switch is connected to the first motor, and a second output end of the diverter switch is connected to the second motor; the coprocessor is configured to generate a selection signal according to the position data, and output the selection signal to the input end of the D trigger; the D trigger is configured to generate a switching signal based on the selection signal and the trigger signal and output the switching signal to the diverter switch, so that the diverter switch turns on the first motor or the second motor. the pressure sensor is connected to the processor, and configured to generate a pressure value when sensing a pressing operation, and output the pressure value to the processor; the processor is connected to the switching circuit, and configured to generate a trigger signal when the pressure value exceeds a set pressure threshold, and output the trigger signal to the switching circuit; the touch sensor is configured to sense position data of the pressing operation and output the position data to the switching circuit; the switching circuit is connected to the first motor and the second motor respectively, and configured to select the first motor or the second motor to vibrate according to the trigger signal and the position data, wherein the switching circuit comprises a coprocessor (355, 455, 555), a D trigger (356, 456, 556), and a diverter switch (357, 457, 557); an input end of the D trigger is connected to an output end of the coprocessor, a clock end of the D trigger is connected to a control end of the processor, and an output end of the D trigger is connected to an enable end of the diverter switch; an input end of the diverter switch is connected to a control end of the processor, a first output end of the diverter switch is connected to the first motor, and a second output end of the diverter switch is connected to the second motor; the coprocessor is configured to generate a selection signal according to the position data, and output the selection signal to the input end of the D trigger; the D trigger is configured to generate a switching signal based on the selection signal and the trigger signal and output the switching signal to the diverter switch, so that the diverter switch turns on the first motor or the second motor.