Provided are a copolymer having enough biocompatibility to be used in a medical material application, and a method of forming a crosslinked body, which involves modifying a substrate surface with the copolymer so that the surface may be biocompatible. More specifically, a protein adsorption-suppressing effect and a cell adhesion-suppressing effect, which are features of a phosphorylcholine group, are imparted to the substrate surface. It has been found that the object is achieved by a copolymer containing a phosphorylcholine constitutional unit, a hydrophobic constitutional unit, and a photoreactive constitutional unit at a specific ratio.