Just stick them in a jar with water covering the white part of the ends. Place them in the fridge, or on a bright area in your kitchen- both will work.
Within a week or so, they’ll be ready again!
You can see in the last image where the onions were last cut. The new growth comes from the center of the onion; what you see here was grown in about a week. I’m a huge fan of doing this, especially in the winters when I don’t have an easy way of growing fresh onions.