As you probably already know it is highly unlikely a deer or elk would attack, but in the one in a million chance one would (has happened I know). Then Bear spray or mace which is an irritant would just as likely cause them discomfort and to disengage an attack as it would a bear or person that was attacking. Nother words I don't think they'd like it.
Did Trigger attack and you had to use your bear spray? Sorry, I couldn't resist. I would think it would work on deer or elk but who really knows. As mentioned before, it is an irritant and should effect any animal.
I work with horses for a living and it will and does effect horses . It will not necessarily effect their skin but if sprayed in their face wear it is hitting more sensitive like the membranes around the eyes mouth or nostrils it would work. A few years ago in yellowstone a ranger was attacked by a cow elk around Mommouth springs . She had a calf with her and she charged him and knocked him off his bike. He turned his bear defense on it and it turned the cow away .
I've spent countless hours either on my hands and knees or bent over, messing up my back, looking for blood. One such instance I remember most was a hog hunt a few years ago in Mississippi. I had never shot a hog so when I poked a hole in this guy; I was determined to find him. Wearing snake leggings, I crawled on my hands and knees through the briars and the brambles and bushes where a rabbit wouldn't go. I found a spot of blood here and there but never the pig. And lucky for me, I didn't find...