In this article, we study the existence of infinitely many nontrivial solutions for a class of superlinear $p$-Laplacian equations$$-\Delta_p u+V(x)|u|^{p-2}u=f(x,u),$$ where the primitive of the nonlinearity $f$ is of subcritical growth near $\infty$ in $u$ and the weight function $V$ is allowed to be sign-changing. Our results extend the recent results of Zhang and Xu [Q. Y. Zhang, B. Xu, {\em Multiplicity of solutions for a class of semilinear Schr\"{o}dinger equations with sign-changing potential}, J. Math. Anal. Appl {\bf 377}(2011), 834--840].