A large electric field at the surface of a ferromagnetic metal is expected to appreciably change its electron density. In particular, the metal's intrinsic magnetic properties, which are commonly regarded as fixed material constants, will be affected. This requires, however, that the surface has a strong influence on the material's properties, as is the case with ultrathin films. We demonstrated that the magnetocrystalline anisotropy of ordered iron-platinum (FePt) and iron-palladium (FePd) intermetallic compounds can be reversibly modified by an applied electric field when immersed in an electrolyte. A voltage change of -0.6 volts on 2-nanometer-thick films altered the coercivity by -4.5 and +1% in FePt and FePd, respectively. The modification of the magnetic parameters was attributed to a change in the number of unpaired d electrons in response to the applied electric field. Our device structure is general and should be applicable for characterization of other thin-film magnetic systems.