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
Post a Comment