Pretty much its been said already.
Depends on the music, the crowd and every bit as much your own personal style.
I generally try to interact with the crowd, you tend to have more fun if you do so. Just about every performance I've been too there hasn't been much in the way of actual dancing it almost always degenerates into a bit of generic moshing.
Its also worth at least once getting the full experience of ribbing and climbing over people to be part of that elite crowd at the front of the stage. Once there you can further entertain yourself by holding the nearest solid object you can find to escape the other wannabe front rower viewers that will push, pull and do anything they can to steal your spot