By and large, the problem with static electricity is not too many or too few electrons, but the fact that they tend to flow more or less all over, getting trapped here and there by local circumstances. In some places there will be an excess that cannot get away, and in others electrons will have left but cannot easily get back.
An example of the latter is the front of a CRT television screen, (one of the old-fashioned bulky kind). The cathode has been bombarding the glass from the inside with electrons, giving it a negative charge. This repels electrons from the front of the screen, so that some of them jump off and got carried away by air currents. As a result, if you pass the back of your hand near the front of a television screen you will feel that there is an electric field and you can work out that it is a positive field.
Now, there are three ways to neutralise such a field after switching off the tube: one can wait until errant electrons in passing breezes are attracted by the positive field and settle on the screen, neutralising it; or one can spray the field with electrons from a suitable electrode, or from a radioactive source of beta rays. In general the simplest and most effective is to make the front of the screen slightly conductive. That will enable any electrons nearby to flow in (or for that matter out) to neutralise the field.
Accordingly most antistatic sprays simply contain moisturisers and possibly some harmless conducting substance. That will soon permit excess electrons to leak away or leak in as required. For as long as the material remains in place there will be no more accumulation or deficit of electrons there.
In general we can be sure that any object that has been permitted to stand long enough in neutral surroundings will become neutralised itself because its charge will bias the movement of electrons around it, attracting electrons if it is positive and repelling them if it is negative. Before the first moon landings I heard some speculation that for all we knew there might be a massive charge on the moon, so that a huge lightning bolt would destroy the first craft to arrive, but of course nothing of the kind happened, and in retrospect nothing of the kind could happen because the moon is constantly bathed by the solar wind, which consists mainly of electrons and protons. As soon as the moon were to pick up an excess negative charge, it would attract protons more than electrons, and vice versa. We could accordingly be sure that apart from a few localised fluctuations, the moon would never be predominantly charged.
The short answer is anti-static spray consists of an electrically
conducting polymer dissolved in a solvent of de-ionised water and
alcohol. When sprayed on a surface, the solvent evaporates, leaving the
polymer as an invisibly thin conducting film, preventing the build up of
excess charge.
This question opens up a fascinating topic, with many
potential threads. Static normally builds up on an insulator, where
charges cannot move, or on a conductor insulated from earth. Most people
have seen the dust that builds up on television screens, particularly
of the increasingly obsolete cathode-ray-tube type. Electrons fired at
the phosphor-based screen make the rear of the screen negatively
charged. This induces a positive charge on the front of the screen,
which attracts negatively charged dust or fluff. Even when the TV is
off, the fluff stays put, held there by its inherent stickiness.
Attracting dust in this way is regarded as a nuisance to
be cured by anti-static spray. However, just over a decade ago,
researchers at the University of Southampton, UK, put this nuisance to
good use in a cockroach trap. There are two things you need to know
about cockroaches: they are positively charged and can climb vertical
planes of glass by secreting a thin film of fluid, which acts as an
adhesive, from their feet.
The trap makes use of a highly desirable pheromone to lure a
hapless insect across a sloping surface that is coated in an
anti-static, or negatively charged, powder. The roach's positively
charged feet become coated in the powder, destroying its ability to gain
traction on the sloping surface. Gravity ushers it into a well, from
which there is no escape. Who dislikes static now?
In reply to Moderater,from an increasingly obsolete ex T.V. engineer, the inside surface of a C.R.T screen is positively charged to about 25Kv due to the thin aluminium layer which connects it to the final anode. In even older times, when tubes were still round, the screens were not aluminised which lead to a peculiar effect known as "sticking" when the E.H.T was raised in an attempt to improve brightness. Aluminised screens overcame this, and also stopped Ion burn, where a dark patch would appear in the centre of the screen. Ah ,Happy days.
When two high-resistance surfaces, such as hair and a plastic comb,
rub together, surface electrons are transferred from one surface to
another, making one positively charged (lacking electrons) and the other
negatively charged (with extra electrons). The surfaces have a high
electrical resistance so the electrons do not move and stay where they
landed, producing static electricity. Anti-static sprays make the
surfaces more conducting, so, although electrons may be dragged by the
rubbing from one surface to another, they do not stay there, because the
surface now allows them to flow away.