Effectively, yes. "Electrolytes" is a collective term for the ions that help move stuff into and out of your cells. These are primarily sodium and potassium, although calcium also plays a role. Sodium is the most important of these for sports drinks, because it is the one you most lose through sweat.
Unfortunately, most sports drinks don't really contain enough to balance out heavy sweating, because sodium salt (aka normal salt) tastes, unsurprisingly, salty. If a drink had the right balance of sodium, it would be noticeably salty. Gatorade has one line of drinks that do that, and Pedialyte is specially made for the correct balance. Sports drinks really jack up the sugar to help hide the salt taste.
Most sports drinks, rather than having the sodium you need to replace sweat, instead jack up the potassium (think Prime and it's advertised 843mg of electrolytes, 700mg of which is potassium). This doesn't really replace the electrolytes you need, but it also doesn't make the drink nearly as salty.
When you see "electrolytes", you should flip around to the nutrition label, which must list the actual amounts of sodium and potassium. This will tell you if it will actually help you recover from activity, or if it's just more sugar water and advertising.
Edited to add:
why is sodium so important? Because your cells use a mechanism called "osmosis" to move water back and forth. Water molecules naturally move from areas of high concentration to areas of lower concentration. In the cell, this means that water will go in to the cell if the inside of the cell has more sodium than the outside, and leave the cell when the outside has more than the inside.
When you sweat, two things happen: you lose water and you lose sodium you lose more water than sodium, so your blood becomes saltier. Water moves from inside your cells to your blood; this is what it means to be "dehydrated". To counter it, you need to dilute your blood and increase the amount of sodium in your cells. Hence, drinking water with sodium can help replenish both and speed recovery from dehydration.