A rolling-ball switch includes a housing defining a chamber and having a bottom wall provided with four spaced-apart through holes, and two conducting units respectively having plate-like connecting members disposed in parallel below the bottom wall. Each connecting member has at least one abutment surface in abutment with the bottom wall, and first, second, and third connecting surfaces adapted to be selectively fixed on a circuit board. Each conducting unit further includes two terminals extending into the chamber via the corresponding through holes and being spaced apart from each other in a longitudinal direction of the corresponding connecting member. A conductive ball is disposed movably in the chamber to move toward or away from the terminals.