Where are you driving in from?
If you only want to spend a couple of hours, it makes sense to do the ocean stop either on the drive to WDW or on the drive home -- and your route will influence where your best stop might be. Depending on your route, there are numerous beaches and all of them are wonderful.
If you're doing a day trip from WDW, it's going to take the better part of a day, even to the closest places -- Jetty Park at Port Canaveral or Cocoa Beach.
Those are both an hour or a little more drive each way, so that's 2.5-3 hours of driving (If you catch part of Orlando's rush hour traffic either way, a little longer). Spend a couple of hours at the beach and you've spent half a day. Go to Ron Jon's for two hours for beach souveniers and you've eaten up most of the day.
Daytona is great, but it's a somewhat longer drive, and as Nacho113 says, there is a ton of stuff to do there -- really too much stuff for a quick "see the ocean" trip.
If you go to the West Coast, the beaches are great, but you could easily spend more than 4 hours driving due to construction delays, rush hour, etc, etc, etc.