Cross-linked polymer films are prepared by the alternating copolymerization of 4-chloromethylstyrene and 7,7,8,8-tetracyanoquinodimethane comonomers, which is followed by the postfunctional surface modification with donor-acceptor chromophores or redox active components using click chemistry reactions.