Elliptic units of global function fields were first studied by D. Hayes in the case that deg infinity is assumed to be 1, and he obtained some class number formulas using elliptic units. We generalize Hayes' results to the case that deg infinity is arbitrary.