Depends on what you mean by browser based hacking.

Websites like Gaia Online where the game is actually a webpage/HTML, then you'd want to pick up JavaScript (you'll also need to know HTML/XHTML and preferably CSS beforehand).

Websites like RuneScape or anything Java/flash-based, you'd need something more along the lines of Python or C++ probably.