Most lighted switches require a neutral wire which you don't have to a switch wired like that.
Some of the older lighted switches had a neon bulb and a resistor in series with the load when the switch was in the off position the neon light would glow. If the light burnt out or was removed from the socket, the switch wouldn't glow.

jtk