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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -