Summarize:

Use a glass or jar that is heavy on the bottom so that it easily stays upright. The water should be cold or room temperature, but not warm. The glass or jar should be tall enough so that it can keep the green onions upright. For example, a pint glass or a large canning jar works well. Since green onions are typically sold with roots still attached, these roots can be used to help keep the onions fresh. By submerging the roots in water, you allow the onions to keep taking in water, which helps the onions stay firm and fresh. Even if the roots themselves have been trimmed off your green onions, but the root end remains, the plant will grow new roots in water. In order to keep the right level of humidity around your green onions in a refrigerator, you need to tent them with a plastic bag. This can be a produce bag or a zip-lock bag, whatever you have available.  It may be easiest to use the produce bag that you brought the green onions home in. If you have tented your green onions with a produce bag, then you can use a rubber band or string to cinch the plastic bag around the container. If you have used a zip-lock bag, you can simply close the zip-lock edge as much as possible toward the sides of the container. The plastic bag does not need to be totally sealed so that it is airtight. You simply want to keep some of the humidity from the water around the onions. If the plastic bag was not there, the refrigerator would remove all of it. Place the glass with the onions in it on a tall shelf of your refrigerator. Put it in a spot where it won't get bumped a lot and where it will be stable so that it doesn't fall over and spill water all over the fridge. When you want to use your onions, just take the container out, remove the bag, remove an onion, place the plastic bag back on, and put it back in the fridge. To keep the onions fresh, you will need to refresh the water regularly. If you don't, mold can accumulate on the surface of the water and can begin to decay the onions. When you change out the water, you can also rinse off the green onion root sections. This will help to remove any bacteria or mold that might be starting to grow on them.
Fill a glass or tall jar with 1–2 inches (2.5–5.1 cm) of water. Put the root end of the onions in the water. Cover the onions and the top of the container in a plastic bag. Cinch the plastic bag around the top of the container. Put the glass in your refrigerator. Change the water every few days.