Skip to content

Commit

Permalink
[7-27] CORS動作確認画面のHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
hidenorigoto committed Dec 28, 2015
1 parent 7def08a commit 198779f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/lists/ch07/07-27.txt
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<button id="test">テスト</button><br />
<textarea id="result" style="width: 500px; height:500px;"></textarea>
<script src="/jquery/jquery-2.1.1.min.js"></script>
<script type="application/ecmascript">
$(function() {
$('#test').click(function() {
$.get('http://127.0.0.1:8000/api/concerts.json', function(data) {
$('#result').text(JSON.stringify(data));
});
})
});
</script>
</body>
</html>
21 changes: 21 additions & 0 deletions web/cors.html
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<button id="test">テスト</button><br />
<textarea id="result" style="width: 500px; height:500px;"></textarea>
<script src="/jquery/jquery-2.1.1.min.js"></script>
<script type="application/ecmascript">
$(function() {
$('#test').click(function() {
$.get('http://127.0.0.1:8000/api/concerts.json', function(data) {
$('#result').text(JSON.stringify(data));
});
})
});
</script>
</body>
</html>

0 comments on commit 198779f

Please sign in to comment.