The dielectric responses of semiconductors such as C, Ge, Si, and AlGaAs are studied by the time-dependent density-functional theory. In our study, the real-space grid representation of the electron wave functions is used and the real-time approach is employed for the dynamics of the system. Both the static and dynamic dielectric functions are calculated, and we yielded that the static dielectric constants ε(0) are especially in good agreement with the experimental values. The effect of Al-component in the compound semiconductor Al
As is also studied. The peaks of the imaginary part of the dielectric function change with the band separation as a function of the Al-component. Furthermore, the static dielectric constants show the expected change due to the band separation as a function of the Al-component.