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

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -