All the water that flows into these lakes escapes only by evaporation. When water evaporates, the dissolved salts are left behind. So a few lakes are salty because rivers carried salts to the lakes, the water in the lakes evaporated and the salts were left behind. After years and years of river inflow and evaporation, the salt content of the lake water built up to the present levels. The same process made the seas salty.
Rivers carry dissolved salts to the ocean.
Water evaporates from the oceans to fall again as rain and to feed the rivers, but the salts remain in the ocean. Because of the huge volume of the oceans, hundreds of millions of years of river input were required for the salt content to build to its present level. Rivers are not the only source of dissolved salts. About twenty years ago, features on the crest of oceanic ridges were discovered that modified our view on how the sea became salty. These features, known as hydrothermal vents, represent places on the ocean floor where sea water that has seeped into the rocks of the oceanic crust, has become hotter, and has dissolved some of the minerals from the crust, now flows back into the ocean.