A class of nonlinear elliptic problems driven by p(x)-Laplacian with a nonsmooth locally Lipschitz potential is considered.By applying the version of the nonsmooth three-critical-point theorem,the existence of three solutions to the problems is proved.