TiO2 and SiO2 inorganic nanoparticles were synthesized with poly(oxyethylene methacrylate)(POEM) and blended with 1-methyl-3-propylimidazolium iodide(MPII), poly(ethylene glycol)(PEG), and iodine(I2) to prepare polymer electrolyte membranes for dye-sensitized solar cells(DSSC). The modified nanoparticles were prepared by the grafting of POEM to TiO2 and SiO2 nanoparticles and put into PEG, MPII and I2 to produce polymer electrolyte membranes. The specific interactions of PEG with the modified nanoparticles in addition to ionic liquid were confirmed by FT-IR spectroscopy and DSC, providing gel formation of electrolytes. The efficiency of DSSC employing TiO2-POEM/PEG/MPII/I2(3.3%) was slightly higher than that employing SiO2-POEM/PEG/MPII/I2(2.9%) due to the different ionic conductivity of electrolytes membrane.