This paper is concerned with the $p(x)$-Laplacian equation of the form begin{equation}label{eq0.1} left{begin{array}{ll} -Delta_{p(x)} u=Q(x)|u|^{r(x)-2}u, &mbox{in} Omega, u=0, &mbox{on} partial Omega, end{array}right. end{equation} where $OmegasubsetR^N$ is a smooth bounded domain, $1<p^-=min_{xinoverline{Omega}}p(x)leq p(x)leqmax_{xinoverline{Omega}}p(x)=p^+<N$, $1leq r(x)<p^{*}(x)=frac{Np(x)}{N-p(x)}$, $r^-=min_{xin overline{Omega}}r(x)<p^-$, $r^+=max_{xinoverline{Omega}}r(x)>p^+$ and $Q: overline{Omega}toR$ is a nonnegative continuous function. We prove that eqref{eq0.1} has infinitely many small solutions and infinitely many large solutions by using the Clarks theorem and the symmetric mountain pass lemma.