http://blogs.msdn.com/b/lightswitch/archive/2014/02/11/a-tour-of-the-lightswitch-html-client-apis-elizabeth-maher.aspx
Visual Studio LightSwitch is the simplest way to build modern business applications for the enterprise.
If you want to know the LightSwitch HTML client API, and where you can hook your javascript code, go read it.