  In the framework of Einstein-Maxwell-scalar theory, we studied scalar field
perturbations of Reissner-Nordstr\"{o}m-Melvin (RNM) black holes, which
describes the RN black holes immersed in a uniform magnetic field. Due to the
coupling to the Maxwell term, the scalar field acquires an effective mass whose
square, in the presence of the magnetic field, will become negative somewhere
outside the horizon for either sign of the coupling constant $\alpha$, thus
triggering the tachyonic instability and leading to spontaneous scalarization
when $\alpha$ is large enough. The magnetic field has significant influences on
the waveforms and the onset of the instability, which differs for different
sign of $\alpha$. Effects of the black hole charge on the instability are also
studied.
