The main issues are
(1) Platform dependence. There's simply no standard, cross-platform screenshot API you can invoke. Someone may have written a portable library of some kind, but it's unlikely to be installed on everyone's machine. Which brings us to...
(2) Security. I hope that a moment's reflection tells you why it would be a bad idea to empower arbitrary Javascript apps to make screenshots of your desktop. There's no way to talk to that cross-platform library, if it even exists, without somehow getting around the security machinery. A signed
Java applet can do it, with considerable pain again for the cross-browser issues.
Now, if this is an Intranet application where all the desktops are Windows, and you can install a java.policy file on each machine, then the path is clear -- it's just a Small Matter of Program. But for the whole problem in its terrible generality, the problems are likely to be insurrmountable.