Created
September 21, 2013 10:35
-
-
Save junpeitsuji/6649291 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 同じドメインの test.cgi から JSONデータを取得して表示 | |
var req = new XMLHttpRequest(); | |
req.open('GET', 'test.cgi', false); | |
req.send(null); | |
if(req.status == 200) { | |
var json = req.responseText; | |
var data = eval(json); | |
alert("key1:" + data.key1); | |
alert("key2:" + data.key2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment