Created
January 8, 2015 08:21
-
-
Save domitry/600ea5618da0f3cc4274 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
<html> | |
<head> | |
<script> | |
window.onload = function(){ | |
var obj = {hoge: "nya", nya: {hoge: 123}}; | |
var content = JSON.stringify(obj); | |
var uriContent = "data:application/json," + encodeURIComponent(content); | |
var newWindow=window.open(uriContent, 'hoge.json'); | |
}; | |
</script> | |
</head> | |
<body> | |
Hello | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment