The polyaniline (PANI) films doped with complex acid (sulfuric acid and sulfosalicylic acid) were prepared using the potentiostatic method on bare nickel flake (NF) and flexible polyethylene terephthalate (PET)/indium tin oxide (ITO) substrates. The contents of the PANI films , surface elements, electrochromic property and electrical conductivity were characterized by energy dispersive X-ray spectrometer (EDS), cyclic voltammetry (CV) and electrochemical impedance spectroscopy (EIS). The experimental results show that differences exist among cycle stability, redox reversibility and response time of polyaniline films on these two kinds of substrates, but the electrochromic phenomenon of the PANI films is in substantial agreement. The equilibrium transmittance spectra in the visible region (400-800 nm) for the PANI film on flexible PET/ITO substrate was obtained at different applied potential from -0.4 to 1.5 V. The results show that the transmittance of the PANI film by applying voltage is adjustable in a row and has excellent electrochromic performance.