A composition comprising a hydrogel polymer for use as a vitreous substitute for replacing the vitreous humor of an eye is disclosed. The hydrogel polymer comprises oxidated hyaluronic acid and a dihydrazide, in which the dihydrazide cross-links the oxidated hyaluronic acid. The hydrogel polymer exhibits the following properties: a) transparent and colorless; and b) transforming from a liquid state into a gel-matrix at 37° C. These characteristics make it useful as a vitreous humor substitute.