The column density of free electrons with a cosmological-scale depth, cosmic dispersion measures (DMs), is among the most interesting observables in future transient surveys at radio wavelengths. For future surveys of fast radio bursts (FRBs), we clarify information available from cosmic DMs through cross-correlation analyses of foreground dark matter haloes (hosting galaxies and galaxy clusters) with their known redshifts. With a halo-model approach, we predict that the cross-correlation with cluster-sized haloes is less affected by the details of gastrophysics, providing robust cosmological information. For less massive haloes, the cross-correlation at angular scales of $<10, mathrm{arcmin}$ is sensitive to gas expelled from the halo centre due to galactic feedback. Assuming $20000$ FRBs over $20000 , {rm deg}^2$ with a localisation error being 3 arcmin, we expect that the cross-correlation signal at halo masses of $10^{12}$-$10^{14}, M_odot$ can be measured with a level of $sim 1%$ precision in a redshift range of $0<z<1$. Such precise measurements enable to put a $1.5%$ level constraint on $sigma_8, (Omega_mathrm{M}/0.3)^{0.5}$ and a $3%$ level constraint on $(Omega_mathrm{b}/0.049)(h/0.67)(f_mathrm{e}/0.95)$ ($sigma_8$, $Omega_mathrm{M}$, $Omega_mathrm{b}$, $h$ and $f_mathrm{e}$ are the linear mass variance smoothed at $8, h^{-1}mathrm{Mpc}$, mean mass density, mean baryon density, the present-day Hubble parameter and fraction of free electrons in cosmic baryons today), whereas the gas-to-halo mass relation in galaxies and clusters can be constrained with a level of $10%$-$20%$. Furthermore the cross-correlation analyses can break the degeneracy among $Omega_mathrm{b}$, $h$ and $f_mathrm{e}$, inherent in the DM-redshift relation.