<!DOCTYPE html>

<html>

<head>

<style type="text/css">
form * {
  display: block;
  margin: 10px;
}
</style>

<script type="text/javascript">
function download(filename, text) {
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
  element.setAttribute('download', filename);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);
}
</script>

</head>

<body>
<div id="focus" onclick="hide()">s</div>
<form onsubmit="download(this['name'].value, this['text'].value)">
  <input type="text" name="name" value="test.txt">
  <textarea name="text"></textarea>
  <input type="submit" value="Download">
</form>
</body>

</html>

Show this record as plain/text

nopaste service by: Roberto Corrado