The below codes get html, encode and send it to any php files. php files include just "hello" string. but when function runs it can get all html but cant send cause of string's long. Because you cant see the HELLO alert. Ajax allows defined longest? Am I right?
function getlongdata(){
htmldatas=encodeURIComponent($('#divlongcontent').html());
alert(htmldatas);
$.ajax({
type: "GET",
url: "sayhello.php",
data: "longdatago="+htmldatas,
success: function(msg){
alert(msg);
}
});
}
<div id="divlongcontent">blablabla1000000000timesblaaaaaaa</div>