javascript - how to get html source code by usng ajax request -
i want html source of particulate url using ajax call,
till have done,
url: "http://google.com", type: "get", datatype: "jsonp", context: document.doctype }).done(function (data) { alert(data); });
but in code give error,
syntaxerror: syntax error <!doctype html><html itemscope="" itemtype="http://schema.or
i want read html call,
how can achive , or other way this?
thanks in advance
the problem specifying datatype: "jsonp"
, html not json. use datatype: "text"
instead
Comments
Post a Comment