Last active
August 29, 2015 14:03
-
-
Save shinchit/cd601c92110cee1e96e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="https://raw.githubusercontent.com/padolsey/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js"></script> | |
<script type="text/javascript"> | |
var uri = 'http://example.xxx'; // 取得対象のURIを指定 | |
$.get(uri, function(res){ | |
// 取得したデータのbodyタグの中身を抜き出す。 | |
var body = $(res.responseText).find('body').text() ; | |
alert(body); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment