Skip to content

Instantly share code, notes, and snippets.

@asith-w
Created February 11, 2015 07:12
Show Gist options
  • Save asith-w/3ec31d0f53a461d107f1 to your computer and use it in GitHub Desktop.
Save asith-w/3ec31d0f53a461d107f1 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/wusosihuco
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
Download fileserver.js demo asith
<script id="jsbin-javascript">
$(document).ready(function () {
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "hello world.txt");
console.log('----------',blob);
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"><\/script>
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"><\/script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
Download fileserver.js demo asith
</body>
<\!--<script async="" src="https://cdn.rawgit.com/eligrey/FileSaver.js/master/FileSaver.js"/> -->
</html></script>
<script id="jsbin-source-javascript" type="text/javascript">
$(document).ready(function () {
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "hello world.txt");
console.log('----------',blob);
});
</script></body>
<!--<script async="" src="https://cdn.rawgit.com/eligrey/FileSaver.js/master/FileSaver.js"/> -->
</html>
$(document).ready(function () {
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "hello world.txt");
console.log('----------',blob);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment