Quickly measuring the salt content in saline-alkali soil (SAS) is an important task. This study proposes a method for rapid detection of salt content. First, we collected the SAS samples and measured the spectral data of these samples with a visible-near infrared spectrometer. Second, a method of converting one-dimensional into two-dimensional spectral data is proposed. Finally, based on convolutional neural network, gravitational search algorithm and reservoir computing extreme learning machine, a salt detection model is constructed. The experimental results show that our proposed method can effectively detect the salt content of SAS with the coefficient of determination value is 0.9 and the root-mean-square error value is 1.55. This method can achieve online rapid detection of salt content. Compared with chemical analysis method, the proposed method saves time and cost.