In a mixing bowl, combine the sweet corn kernels, flour, eggs, milk, baking powder, garlic powder, onion powder, salt, and black pepper. Stir until just combined. If using, fold in the chopped green onions.
Heat about ½ inch of vegetable oil in a frying pan over medium heat.
Once the oil is hot (test by dropping a small spoonful of the batter into the oil; it should sizzle immediately), use a ladle or scoop to drop spoonfuls of the corn mixture into the hot oil, being careful not to overcrowd the pan.
Fry the fritters until golden brown and crispy on one side (about 2-3 minutes), then carefully flip them to cook on the other side for another 2-3 minutes.
Remove the fritters from the oil and place them on a plate lined with paper towels to absorb any excess oil.
Repeat the frying process until the entire batter is cooked, adding more oil as necessary.
Serve hot with your favorite dipping sauce or simply enjoy them as they are.