Unless its a device that uses a battery (you have to charge it to use it) then it should still work because water isnt going to do shit to plastic... And headphones and plastic + wires wrapped in plastic:)
The thing is, headphones themselves are not "electric". So the exposure to the water in the washer doesn't do anything to the headphones, so long as they do not have a current running through them. Now if you had somehow managed to leave your headphones that were plugged into your phone (lets say for instance that your phone is waterproof) in your pants and they ran them through the wash, when the now "electric" headphones are exposed to the water, they would not work when you found them after the spin cycle. JasonXtreme