A lid of a garbage container, configured to be assembled on a barrel body and define a receiving space with the barrel body, the lid of the garbage container including: a main body, including an input opening configured to be communicated with the receiving space; and an opening and closing system, disposed on the main body, including a lid member, a processing unit, a sensing unit and a driving unit, the lid member being disposed on the main body and openably covering the input opening, the lid member being pivotally connected with the main body at one side of the input opening, the sensing unit being electrically connected with the processing unit, the driving unit being electrically connected between the processing unit and the lid member, the sensing unit being activatable, from an outside of the garbage container, to transmit an actuation signal to the processing unit, the processing unit receiving the actuation signal and driving the driving unit, the driving unit driving the lid member to move along a moving path and uncover the input opening; wherein the opening and closing system further includes a timing unit which is electrically connected to the processing unit, the timing unit being actuatable by the processing unit; characterized in that the lid of a garbage container further comprises a locking device, including a blocking member disposed on the main body, the blocking member configured to be externally operable and manually movable between a locking position and a releasing position, wherein when the blocking member is in the locking position, the blocking member is on the moving path and at least partially interferes with and blocks the lid member; when the blocking member is in the releasing position, the blocking member is off the moving path and free of interference and non-blocking with the lid member; wherein the blocking member is located at another side of the input opening opposite to the one side of the input opening at which the lid member is pivotally connected with the main body; wherein the blocking member is swingably disposed on the main body and swingable between the locking position and the releasing position; wherein the blocking member includes a shaft and a blocking portion, the shaft being rotatably disposed on the main body, the blocking portion being transversely disposed on the shaft, wherein, when the blocking member is in the locking position, the blocking portion is on the moving path to block the lid member; and wherein, when the driving unit drives the lid member, the timing unit is configured to start and count to a preset time, and the processing unit is configured to transmit a stop signal to stop the driving unit. a main body, including an input opening configured to be communicated with the receiving space; and an opening and closing system, disposed on the main body, including a lid member, a processing unit, a sensing unit and a driving unit, the lid member being disposed on the main body and openably covering the input opening, the lid member being pivotally connected with the main body at one side of the input opening, the sensing unit being electrically connected with the processing unit, the driving unit being electrically connected between the processing unit and the lid member, the sensing unit being activatable, from an outside of the garbage container, to transmit an actuation signal to the processing unit, the processing unit receiving the actuation signal and driving the driving unit, the driving unit driving the lid member to move along a moving path and uncover the input opening; wherein the opening and closing system further includes a timing unit which is electrically connected to the processing unit, the timing unit being actuatable by the processing unit; characterized in that the lid of a garbage container further comprises a locking device, including a blocking member disposed on the main body, the blocking member configured to be externally operable and manually movable between a locking position and a releasing position, wherein when the blocking member is in the locking position, the blocking member is on the moving path and at least partially interferes with and blocks the lid member; when the blocking member is in the releasing position, the blocking member is off the moving path and free of interference and non-blocking with the lid member; wherein the blocking member is located at another side of the input opening opposite to the one side of the input opening at which the lid member is pivotally connected with the main body; wherein the blocking member is swingably disposed on the main body and swingable between the locking position and the releasing position; wherein the blocking member includes a shaft and a blocking portion, the shaft being rotatably disposed on the main body, the blocking portion being transversely disposed on the shaft, wherein, when the blocking member is in the locking position, the blocking portion is on the moving path to block the lid member; and wherein, when the driving unit drives the lid member, the timing unit is configured to start and count to a preset time, and the processing unit is configured to transmit a stop signal to stop the driving unit.