var s = document.createElement('script');
s.type = 'application/javascript';
// path to the desired file
s.src = 'http://code.jquery.com/jquery-1.6.2.js';
document.body.appendChild(s);