NaCl inhibits bacterial growth by osmotic pressure, in much the same way
that sugar in jelly and honey prevent most mnicrobial groth. I don't
have specific info on other salts, but I would expect them to behave in a
similar fasion, at least with respect to osmotic pressure.
Geoff Crawford's assertion that Cl inhibits viruses is, I beleive, a
little off the mark. It isn't the Cl itself in bleach that inhibits
viruses. Rather, it is hypochlorite, a different species. This molecule
inhibits by oxidizing cellular proteins and lipids, and is also
sporcidal, which salts are not.