my web server is a simple html server. there is no node.js,no php so i wanna make a zip file by js of the directory "/public_html/alpha" mainly i wanna zip the alpha folder
I tried the jszip.js and zip.js but didnt work.why i dont know..
Here is the code:
<html>
<head>
<script src="/jszip.js"></script>
</head>
<body>
<p>Works on firefox, chrome , opera >= 15 and IE >= 10 (but NOT in compatibility view).</p>
<button id="blob" class="btn btn-primary">click to download</button>
<script>
var zip = new JSZip();
zip.file("readme.txt", "alpha");
jQuery("#blob").on("click", function () {
zip.generateAsync({type:"blob"}).then(function (blob) { // 1) generate the zip file
saveAs(blob, "hello.zip"); // 2) trigger the download
}, function (err) {
jQuery("#blob").text(err);
});
});
</script>
</body>
</html>
This Code dont even give any result.
Server link : For Check Click Here
Add jquery on header
then in script make it like this