For those that can't wait for google, there are already some pretty mature browser-based terminals out there. For example shellinabox (https://code.google.com/p/shellinabox/) which is a full javascript implementation of a vt100 compatible terminal plus a server written in C providing pty streams over http. Web shell (http://code.google.com/p/web-shell/) is another one, doing all the terminal emulation on the server written in python and transferring full lines to the browser.
If you're interested to write your own terminal emulator, have look at pyte (https://github.com/selectel/pyte), a very clean and beautiful python library to write vtxxx compatible terminal emulators.