I want to retrieve source code of a javascript file( eg: xxx.js) from some url. I could get html from url but when I try to do get .js file using same method, it fails.
How can I get a whole source of js file from url?
Here's what worked for HTML :
$.ajax({
url : "http://localhost:8080/aaa/bbb/xxx.html",
success : function(result){
var a= result;
alert(a);
}
});
Use this
<script type="text/javascript" src="xxx.js"></script>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments