$(document).ready(function(){
$("#btnLoad").click(function(){
$('#div1').load('test.txt', {}, fnLoad());
});
});
function fnLoad()
{
// How can I load the content of <div id="div1" /> into a variable here?
}
In fact, I want to work with the variable instead of div1.innerHTML.
var.load('test.txt',{});work?