We have calculated the optical properties (the imaginary part of dielectric function ε2(ω), the optical absorption coefficient I(ω), the reflectivity R(ω) of SrTiO3 and SrHfO3 by the full potential linearized augmented plane wave (FLAPW)method. Through comparing their optical properties, we obtained the ifference between SrTiO3 and SrHfO3 and explained such a difference. Our calculated optical spectra have mainly four peaks around 4.4, 7.4, 8.3 and 23.6 eV, and the peak at about 4.4eV is sharp and high. Our calculated results are in good agreement with the experimental data.