The appearance of foam in the stool should be related to fermentation, eating too much beans or carbohydrates, because fermenting bacteria can produce foam, which is excreted during the stool. In addition, enteritis and indigestion may also appear foam in the stool. Patients with indigestion will leave more food residues after eating, which will be mixed with foam in the stool after fermentation of bacteria in the intestine to produce gas. Once the stool with foam, it is recommended to go to the hospital to do a colonoscopy, blood routine, etc., and then specific treatment, you can choose to take oral antibacterial drugs, such as ofloxacin, norfloxacin, etc. In addition, you should adjust your diet, try to eat less and more meals, mainly easy to digest food, and avoid cold, greasy, spicy, stimulating and excessive fiber-containing food.