title: ReferenceError: "document" is not defined
body: <p>Im new to JavaScript and even more new to Google Apps Script. Im trying a simple function that shows the current date (only day, month e and full year), but the Google Script show the error  ReferenceError: "document" is not defined.</p>
  
  <p>My goal is to use this function in a Google Site. Here is the code:</p>
  
  <pre><code>function Data()
  {
  var d=new Date();
  var dia=d.getDate();
  var mes=d.getMonth();
  var ano=d.getFullYear();
  var DataCompleta=dia + "/" + mes + "/" + ano
  document.write(DataCompleta);
  }
  </code></pre>