Most dishwasher detergents are composed primarily of a basic salt, such as
sodium carbonate and a low-foaming detergent (surfactant). Wetting agents
may also be added to avoid streaking. The idea behind the salt is that
it's hydrolized in the presence of very hot water to create a very basic
(pH near that of lye) solution, which will saponify grease and oils.
Fragrance and colorants may be added (no practical sanitary value, but it's
done nonetheless) and sometimes chlorine bleach is a component (which
accounts for a chlorine odor that you may smell). All of this information
is available from most manufacturers' MSDS (and most are available online).
Would I wash electronics in a dishwasher loaded with dishwasher detergent?
I don't think so--the combination can attack certain metals, such as
aluminum and magnesium (note that the label on your detergent says NOT to
wash aluminum cookware in the dishwasher). More important in my mind is
that conductive salts might be left behind.
If I felt a need to wash some electronics, I'd do it with warm or hot water
and a simple detergent without added salts. While the action of a
dishwasher detergent might be handy if you dumped a bottle of Cheez Whiz
into your keyboard, I'd think that it'd be overkill in most cases.
Cheers,
Chuck