Einstein's equivalence principle (EEP) can be tested by the time delay between photons with different energies passing through a gravitational field. As one of the most energetic explosions in the Universe, gamma-ray bursts (GRBs) provide an effective tool to test the accuracy of EEP. In this paper, we use the continuous spectra of 20 short GRBs detected by the Swift/Burst Alert Telescope to test the validity of EEP. Taking the duration of GRBs as the upper limit of the time delay induced by EEP violation (assuming that the high energy photons arrive later than the low energy photons), the difference of the parametrized post-Newtonian parameter is constrained with high accuracy. The strictest constraint, |gamma(150 keV) - gamma(15 keV)| < 5.59 x 10(-10) from GRB 150101B, is about 1 similar to 2 orders of magnitude tighter than previous constraints. Moreover, our result is more statistically significant than previous results because we use the continuous spectra instead of isolated photons.