Consider the elliptic equation (E) in with on and the elliptic system (S) in subject to on , where is a bounded domain in with smooth boundary . Under suitable conditions on and , nontrivial solutions are obtained for (E) provided that crosses several eigenvalues of . Similar results are proved for (S) as well as for Hamiltonian systems. Here we do not need to have an asymptotic limit, which was assumed in the literature for similar problems. (This is joint work with Jiabao Su and Zhi-Qiang Wang.)