javascript - Simple http request and response -


var _body = document.getelementsbytagname('body')[0]; var newscript = document.createelement('script'); newscript.type = 'text/javascript'; newscript.src = "http://someurl.com?param1=one" _body.appendchild(newscript); 

my question is

is there way store respose simple http request ? (like have httprequest.onreadystatechange if using ajax)

there no way directly access source code of externally loaded javascript within javascript.

you (cross-origin rules permissions) request script xmlhttprequest, or script loaded might include code exposes relevant data in global variable (or passes data callback function provide).


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -