  It is a classical result that the parity-balance of the number of weak
excedances of all permutations (derangements, respectively) of length $n$ is
the Euler number $E_n$, alternating in sign, if $n$ is odd (even,
respectively). Josuat-Verg\`{e}s obtained a $q$-analog of the results
respecting the number of crossings of a permutation. One of the goals in this
paper is to extend the results to the permutations (derangements, respectively)
of types B and D, on the basis of the joint distribution in statistics
excedances, crossings and the number of negative entries obtained by Corteel,
Josuat-Verg\`{e}s and Kim.
  Springer numbers are analogous Euler numbers that count the alternating
permutations of type B, called snakes. Josuat-Verg\`{e}s derived bivariate
polynomials $Q_n(t,q)$ and $R_n(t,q)$ as generalized Euler numbers via
successive $q$-derivatives and multiplications by $t$ on polynomials in $t$.
The other goal in this paper is to give a combinatorial interpretation of
$Q_n(t,q)$ and $R_n(t,q)$ as the enumerators of the snakes with restrictions.
