We investigate the resistance switching mechanism in memristors based on colloidal ZnO nanoparticles using electroabsorption (EA) spectroscopy. In this EA experiment, we incorporate a small amount of low-bandgap polymer, poly(9,9-dioctylfluorene-co-benzothiadiazole), as a probe molecule in ZnO-nanoparticle memristors. By characterizing this polymer, we can study the change of built-in potential (VBI) in the device during the resistance switching process without disturbing the resistance state by the EA probe light. Our results show that VBI increases when the device is switched to the high resistance state, suggesting a shift of effective workfunction of the electrode. Thus, we attribute the resistance switching to the field-dependent migration of oxygen vacancies associated with the adsorption and desorption of oxygen molecules at the Al/ZnO interface. This process results in the modulation of the interfacial injection barrier, which governs the resistance state of the device.