Creating Javascript Blob() with data from HTML Element. Then downloading it as a text file
问题 I'm using an HTML5 site to create a log per-say within a textarea element. I need to pull the data from that area with the click of a button, and download it to my computer via a .txt file. How would I go about doing this if it is possible?? HTML: <input type="button" onclick="newBlob()" value="Clear and Export"> Javascript: function newBlob() { var blobData = document.getElementById("ticketlog").value; var myBlob = new Blob(blobData, "plain/text"); blobURL = URL.createObjectURL(myBlob); var