But only if you are motivated enough to keep up with your studying and assignments. I attended an online university and while it was expensive, it was nice to be able to learn from the comfort of my own home. At the same time though, an online school can be used as a degree mill if all you're looking for is a degree without the knowledge.
Teachers can't interact with students through online classes. It's impossible to tell if students are paying attention, and students can't ask their teachers questions. There is a reason that most for-profit colleges are based on the internet. They do not care about educating their students, but just collecting their money.