This program demonstrates how to read a blob.
<!DOCTYPE html> <html> <head> <title>XoaX.net's Javascript</title> <script type="text/javascript" src="ReadABlob.js"></script> </head> <body onload="Initialize()"> <p id="idText"></p> </body> </html>
function Initialize() {
var qBlob = new Blob(["Reading a blob at XoaX.net"], {type : "text/plain"});
var qFileReader = new FileReader();
qFileReader.addEventListener("loadend", function(qEvent) {
document.getElementById("idText").innerHTML = qEvent.srcElement.result;
});
qFileReader.readAsText(qBlob);
}© 20072025 XoaX.net LLC. All rights reserved.