xmlhttprequest - JQuery AJAX and XHR2 responseType "document" -
xmlhttprequest - JQuery AJAX and XHR2 responseType "document" -
i requesting website jquery's ajax function. little bit unclear responsetype of xhr request. far using "datatype: "html"" attribute not happy it.
i'd rather have finish htmldocument returned allow me traverse dom tree , scrape info needed. believe "document" responsetype supported xhr2 requests.
how can done jquery? there way homecoming domtree can navigate through?
simply add together next $.ajax()
call:
xhrfields: { responsetype: "document" },
to retrieve document object, success
phone call should this:
success: function(data, textstatus, request) { if (textstatus == "success") { myresponse = request.responsexml; } else // not successful },
jquery xmlhttprequest
Comments
Post a Comment