title: document.write is not working
body: <p>I'm trying to make it "document.write" but it doesn't come up. I'm using Dreamweaver.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
  &lt;head&gt; 
  &lt;title&gt;Untitled Document&lt;/title&gt; 
  &lt;script&gt; 
    x=0;
    function newPerson(){
      x++;
      document.write(x);
      var pname = "p" + x;
      var jj =document.forms["frm1"]["fname"].value;
      var gg =document.forms["frm1"]["lname"].value;
      document.write(pname + jj + gg);
    }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;form name="frm1" onSubmit="newPerson()"&gt;
  
    First Name: &lt;input type="text" id="fname" name="fname"/&gt; &lt;br/&gt;
    Last Name: &lt;input type="text" id="lname" name="lname"/&gt;&lt;br/&gt;
    &lt;input type="submit" value="update"/&gt;  &lt;/form&gt;
  
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>