We present a generic framework, JSCloud, for the remote execution of JavaScript programs. Our work dynamically estimates whether a code partition should be executed remotely. The empirical result shows that JSCloud can be useful if the JavaScript engine on a handheld device is inefficient.