title: Filling in specific fields in a form on a website [Greasemonkey / Javascript]
body: <p>I'm fairly new to scripting, but I was looking for a way to automatically fill in certain fields on a certain webpage on a click of a button.</p>
  
  <p>So far I have managed this:</p>
  
  <pre><code>//Adding a button
  x=0
  var input=document.createElement("input");
  input.type="button";
  input.value=x;
  input.onclick= fillValuesInTextBoxes;
  input.setAttribute("style", "font-size:18px;position:absolute;top:120px;right:40px;");
  document.body.appendChild(input); 
  
  
  function fillValuesInTextBoxes()
  {
      document.getElementById('username').value="MyUserName"
      document.getElementById('password').value="MyPassWord"
  }
  </code></pre>
  
  <p>It seems I'm off with the Ids or anything else, but I can't figure out what exactly. The website I've taken for references is Darkthone login page (See include). </p>
  
  <p>Maybe somebody could tell me how to find the propper Id or Tag of each field? </p>
  
  <p>And how to add certain input to those fields in a simple way?</p>