At least on the server side I can use stricter languages. On the client I can do it only indirectly (I'm thinking of playing with TypeScript ... someday).
You should check out js_of_ocaml [1]. It's a very good compiler from OCaml to JavaScript which lets you interface with the DOM and existing JavaScript libraries relatively easily. You can play around with OCaml in the browser[2], which was implemented using js_of_ocaml.