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

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -