Photonic crystal has drawn much attention because of its application in molding the flow of light, which can be used in optical communication, optical storage and computing. In theory, plane wave expansion method, finite difference time domain (FDTD) method and transfer matrix method are widely used methods to study photonic crystal, and each of them has its own advantages and disadvantages.Here, a new method i.e. mixed variational method is introduced to study the photonic crystals, which is from the work of anti-plane shear waves in periodic layered elastic composites. The calculations of this method are direct and require no iteration, which accurately and efficiently produce the entire band structure of the composite and other field characteristics. Moreover, the composite cell in this method may consist of any number of units of any variable permittivity and permeability.Firstly, based on the variational principle, the Lagrangian density of electro-magnetic field is obtained. Then through the surface integral of the Lagrangian density in the unit cell, the Lagrangian is acquired. The first variation of Lagrangian with respect to electric field and magnetic field yields a set of Euler-Lagrange equations. Approximate solutions in explicit series expressions subject to the Bloch periodicity are substituted into the above equations. Minimization of Lagrangian with respect to the electric field and magnetic field results in an eigenvalue problem, and to solve it, the band structure of the composite is yielded. Electrical field, magnetic field, group velocity and energy flux density are also calculated. Secondly, we use the above method to study a two dimensional air-rod unit cell system. Bandgaps with respect to different structural parameters are plotted, which are the same as the results from the plane wave expansion method and FDTD method. In theory, the entire band structure can be calculated with our method. There are more gaps for TE wave than for TM case. By constant frequency contours, it is shown that there is a gap between the first and the second pass band for TE wave, however, there is no a gap for the corresponding TM wave. The directions of group velocity for the first and the second bands are shown in the contours. Electrical field, magnetic field and energy flux in cells illustrate the energy distribution, and the energy-flux directions and the group-velocity directions are also essentially the same. Lastly, we apply this mixed variational method to one-dimensional media-air slab and three dimensional sphere-air structure. The obtained band results accord with those reported previously former, which demonstrates that our method is universal and correct.In the present work, a mixed variational approach is proposed to produce the entire band structure of the composite for unit cells with any arbitrary properties. Explicit expressions are developed for the band, electrical field, magnetic field, group velocity and energy flux.