BOTH !
It is the heating effect from the current flowing through the body and physical damage from muscle spasm that makes them dangerous. It makes no difference whether it is AC or DC if the current is high enough to cause injury.
If the person is still capable of movement, there is, under some circumstances, slightly more chance of them escaping from AC because muscle spasm tends to work in opposite directions as the polarity changes so combined with the mass of the body it has less effect on overall movement. DC wil tend to stretch muscle during spasm and hold it in place, making it more difficult to pull away.
However, for all practical purposes, they are equally dangerous.
Note it is the current that does the damage - not the voltage unless it is high enough to arc to the body in which case it can cause severe burns.
Brian.