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 En, alternating in sign, if n is odd (even, respectively). Josuat-Vergè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ès and Kim.Springer numbers are analogous Euler numbers that count the alternating permutations of type B, called snakes. Josuat-Vergès derived bivariate polynomials Qn(t, q) and Rn(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 Qn(t, q) and Rn(t, q) as the enumerators of the snakes with restrictions.