the code is as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<input name="download" id="download" />
<button type="button" onclick="down()"></button>
</body>
<script>
function down() {
window.webkitRequestFileSystem(Window.TEMPORARY,1024*1024,function(fs) {
var fileEntry = fs.root.getFile("Test.txt",{create: true});
var fileWriter = fileEntry.createWriter();
fileWriter.seek(10);
var blob = new Blob(["hello,the world"]);
fileWriter.write(blob);
console.log("Successfuly")
},(err) => {
console.log(err);
});
}
</script>
</html>
browser error:
DOMException: It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.