Edit in JSFiddle

function aniadirTexto() {

  var texto = document.getElementById("texto")
  var mostrar = document.getElementById("mostrar_texto")

  mostrar.innerHTML += texto.value;

}
<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="main.js"></script>
  </head>

  <body>
    <form>
      <input type="text" id="texto" />
      <button type="button" onclick="aniadirTexto()">AƱadir texto</button>
    </form>

    <div id="mostrar_texto"></div>
  </body>

</html>