This paper will present a concept to use matermaterial thin film deposited on a window glass to absorb tuned solar spectrum for anti-frost/anti-fog and energy-saving in cold weather, meanwhile the luminous transmittance of the windows can be maintained. In warmer weather, the opposite side of a rotatable window can be turned to face the sunlight to reflect the sunlight away with the perfect mirror function of the base ground layer of the metamaterial thin film. By adjusting base ground coating structure, perfect or non-perfect mirror can be formed for natural solar reflection or transmittance. The metal-dielectric-metal nano-scale metamaterial structures with periodic metal-dielectric interfaces, when shined with light, acquire surface plasmons thus trapping light at subwavelength scales. When the metamaterial film is coated on the outside of a glass window, it will lead to efficient solar radiation absorption, which can be used for anti-frost/anti-fog and energy-saving windows of transportation vehicles and modern buildings. The total thickness of the so-called metamaterial solar absorber thin film is a few tens of nanometer and its absorption band is broad, tunable and insensitive to the angle of incidence.