The invention discloses an automatic opening and closing device of a window. The automatic opening and closing device comprises a fixed framework, a movable framework and glass which is arranged in the frameworks, and is characterized by comprising a mounting plate, a
pipe seat, a
pipe sleeve, a
piston rod, a reset spring, an
electromagnet and a control terminal, the mounting plate is located at left and right ends of the inner side of the fixed framework, the mounting plate is in threaded connection with the fixed framework, the
pipe seat is located at the center of the top of the mounting plate, the pipe seat is in threaded connection with the mounting plate, the pipe sleeve is located in the pipe seat, the pipe sleeve is in rotatable connection with the pipe seat, the
piston rod is located at the center of the inside of the pipe sleeve, the
piston rod is in sliding joint with the pipe sleeve, the reset spring is located at the lower end of the inside of the pipe seat, the reset spring is in welded joint with the pipe seat, the
electromagnet is located at the center of the bottom end of the pipe sleeve, the
electromagnet is in
adhesive joint with the pipe sleeve, the control terminal is located at the upper end of the right side of the fixed framework, and the control terminal is in threaded connection with the fixed framework. By means of the automatic opening and closing device of the window, automatic opening and closing of a
glass window can be achieved, and operation by a user is greatly convenient.