The invention provides a washing machine capable of preventing failure of electric parts, etc. caused by a large quantity of detergent foam generated during washing. The washing machine comprises a rotary drum (31) with a center axis of rotation in the horizontal direction or inclined direction, an elastically supported water receiving tub (33) which encloses the rotary drum (31), a water supply valve (44) for feeding water into the water receiving tub (33), a water level detecting means (46) for draining water inside the water receiving tub (33), a drain valve (43) for draining water in the water receiving tub (33), and a control means (48) for controlling the washing, rinsing and dewatering operation, etc. The state of generation of the detergent foam inside the water receiving tub (33) is detected based on the change of signals of the water level detecting means (46), and the foam eliminating process, washing process, rinsing process, water feeding process and draining process thereafter are controlled, so that failure caused by adhesion of the generated detergent foam to the electric parts can be prevented. |