0% found this document useful (0 votes)
8 views1 page

Log Parser Tool with Download Feature

Uploaded by

vicege3221
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Log Parser Tool with Download Feature

Uploaded by

vicege3221
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<!

DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>log parse</title>
</head>
<body>
<textarea id="input"></textarea>
<button id="download" type="button">download</button>
<script>
[Link]("download").addEventListener("click", function() {
var inputtext = [Link]("input").value
var filename = "download_sample.txt"

saveFile(inputtext, filename)

}, false)

function saveFile(contents, filename) {


var filename_ = filename || "[Link]"

var blob = new Blob([ contents ], { "type": "text/plain" })

var msSaveBlob = [Link]


if (msSaveBlob) {
msSaveBlob(blob, filename)
} else {
var a = [Link]("a")
[Link] = [Link](blob)
[Link] = "_blank"
[Link] = filename
[Link]()
[Link]([Link])
}
}

</script>
</body>
</html>

You might also like