Through the perturbation formula of time-dependent density functional theory (TDDFT) broadly employed in the calculation of solids, we provide a first-principles calculation of the electronic dynamic structure factor in warm dense region.The calculated results are directly used to compare with the experimental X-ray Thomson scattering spectrum of warm dense matter, and most of them are consistent well with the measurements.The deviations between our results and the previous measurements may well reveal the unique electronic properties of warm dense matter different from solids, which can be further illustrated by future experiments.