javascript - Fetch html page content into a var -


just small question here, how fetch html content via ajax variable use later.
right now, have button on click of which, fetch html page through load method follows:
$('#container').load('http://127.0.0.1/someurl')

i want content var instead @ later time use append dom
$('#somecontainer').append(somevar)

var somevar;  $.get("http://127.0.0.1/someurl",function(data){    somevar = data; }); 

i use $.get instead


Comments

Popular posts from this blog

python - Setting ctypes.Structure default values -

java - why am i getting a "cannot resolve method" error on getApplication? -

C# Apple Bonjour - how to monitor service records within Windows -