It is probably best to take a flight. Ontario is about 90 minutes without traffic (maybe a little less) but depending on what time of day you may hit traffic on the 105, 605, or 10 which are the freeways you would take.
If you have enough time, rent a car from Avis to pick up at LAX and drop at ONT.