Conventional coding metasurfaces only consider the different phase responses and encode the spatial-domain parameter, whereas the phase sensitivity of the frequency-domain parameter is not considered. When traditional digital metasurfaces are used to control terahertz waves, they have fixed functions once the coding sequence has been determined. To address this shortcoming, a windmill-shaped structure is adopted herein to construct spatial-frequency coding metasurfaces that take into account not only the initial phase response parameter but also the frequency-domain parameter in the terahertz band. Using such a metasurface, the energy radiation of terahertz wave can be manipulated by only changing the working frequency without redesigning the structure of the coding metasurface. The physical phenomena are confirmed by numerical simulations with 1-bit and 2-bit periodic as well as nonperiodic spatial-frequency coding metasurfaces.