Jeff Parsons has written an impressive in-browser 6502 simulator ([*]may not be compatible with all browsers)
See here for a demonstration Ohio Scientific Challenger 1P, and see
here for 9 instances on the same page. (The point being to demonstrate the easy embeddability and also the performance)
Attachment:
File comment: screenshot of http://cpusim.org/c1p OSI-6502 Simulator
c1p-js.png [ 52.36 KiB | Viewed 2541 times ]
There's a version with a debugger, and one without. The embedding instructions are
here.
It looks like Jeff previously wrote a Windows program, which is
still available.
[*] (It's a bit unusual, making use of xml and xslt, and the JavaScript looks machine-generated to me too.)
Update: there's now quite a variety of in-browser 6502 emulators where you can indulge in programming. For a currently-maintained list, see
here or
here. I particularly recommend
easy6502 as it comes with an assembler, disassembler and is embedded in a very good tutorial.