jquery - How can I get Javascript Source(js file) from url? -


i want retrieve source code of javascript file( eg: xxx.js) url. html url when try .js file using same method, fails.

how can whole source of js file url?

here's worked html :

$.ajax({ url : "http://localhost:8080/aaa/bbb/xxx.html", success : function(result){      var a= result;     alert(a);      } }); 

use     <script type="text/javascript" src="xxx.js"></script> 

Comments