J.E.
My son was inclined to do the same when he was about that age. I was frightened to death one day at the Edina Art Fair when he absolutely disappeared from my side into the crowd. He was so small that he could easily disappear under the display tables. He thought this was funny and a game.
Someone had given us a harness that went around his torso and had a leash on it. That proved a very handy thing. We took him to the State Fair with it later that year - got some weird looks and criticisms, but just as many questions about where to find one. He wasn't especially fond of it and neither were we, but he finally got the idea. Some have mentioned something around the wrist, but I'd look for one that goes on the torso, as it affords more control and likely wouldn't chafe the way a wrist band could.