A simple measurement of beta-function is to detect the shift in the betatron tune as the strength of an individual quadrupole magnet is varied. The beta-function value obtained is a mean value respect to the length of the quadrupole. The beta-function values at 30 quadrupoles in the HLS storage ring were measured by this means. The measurement results using different calculation formulas are compared with the ideal values. Error analysis is also given. Methods to improve the precision of the measurement are put forward for the advanced measurement.