Where did the oceans come from?

It also says

Most of the water appears to have formed in the solar nebula as the Sun was forming, before the formation of the Earth.

Pretty much, yes, though probably not in the form of sodium chloride itself.

Sodium and chlorine exist in many forms in the Earth. For example, magma contains both chlorine and sodium. I did some searching to see if I could find just how large the trace amounts are, but didn’t find a specific number. Even the lavas described as “high in sodium” are still 75% silicon dioxide. So while we’re talking about trace amounts, the sheer volume of magma in the Earth means that the amount of salt currently in the ocean could be replaced many times over given enough time.

SD Serendipity.[sup]TM[/sup]