The invention provides a lens for a digital camera including a first barrel, a second barrel and a base. A lens and a ring securing element are arranged in the first barrel. One end of the ring securing element resists the lens. The second barrel includes an upper barrel and a lower barrel. The first barrel and an infrared-cut filter are received in the upper barrel. The other end of the ring securing element resists and fixes the infrared-cut filter between the first barrel and the second barrel. A spacer is arranged in the second barrel and between the upper barrel and the lower barrel, and a through hole is arranged at the center. A step is arranged on the inner periphery of the through hole of the spacer where the infrared-cut filter is placed. The infrared-cut filter is fixed together by the step and the ring securing element. The base and the lower barrel are matched in a height-adjustable manner. The invention fixes the first barrel on the upper barrel of the second barrel by a pressing method, while fixes the infrared-cut filter by clamping the first barrel and the second barrel without gluewater, thereby reducing the producing difficulty of the lens and the producing cost.