An electronic device, comprising a first motor , a second motor , a touch sensor , a pressure sensor , a processor , and a switching circuit , 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 , a D trigger , and a diverter switch ; 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 , a D trigger , and a diverter switch ; 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. <EOS>