The invention relates to a pasting device for electronic devices in electronic industry. Pasting task is completed by robots. The pasting device consists of a robot A, a robot controller B, a fixed CCD (charged coupled device) camera C, an illuminator D, and a mobile CCD camera E. The pasting method comprises the steps that the robot detects feeding of a PCB (Printed Circuit Board), the mobile CCD cameras takes a picture to record a first MARK point position of the PCB, and the mobile CCD cameras takes a picture to record a second MARK point position, vision software calculates and regulates the target coordinates of the robot, the target coordinates of the robot are regulated along with position change of the PCB, the fixed CCD camera takes a picture to record the standard position of the irregular device, the vision software conducts correction and converts into the standard coordinates of the robot, the fixed CCD camera takes a picture to record the coordinates of the irregular device after being moved, positions of the internal points of the robot controller are regulated, the current coordinates and the standard coordinates of the device are compared, angles and translation are sequentially corrected, and the irregular device with the corrected coordinates is moved to the target coordinates of the PCB. In the method, the pasting machine is replaced with the robot, so that the investment is saved and the pasting efficiency is improved.