Having a sharp knife and leaving the root intact definitely work as mentiined by @ScottinPollock above.
Also placing a wet papet towel on your cutting board surface helps.
When I slice into an onion and notice it to have more juice than being on the dryer side then rinsing under cold water helps.