title: How to append the variable value to the element using document.write
body: <p>I am trying to append the variable value to the element</p>
  
  <p>what i am doing is i am taking the input body onload by using javascript prompt.</p>
  
  <p>now i am storing the input value to one variable.</p>
  
  <p>now i want to append the variable value to this element</p>
  
  <pre><code>&lt;a href="#" class="uname"&gt;Welcome User!&lt;/a&gt;
  </code></pre>
  
  <p>in place of welcome user,i want to get the input variable value.</p>
  
  <p>here is the code i am using..</p>
  
  <pre><code>function inpt(){
      var person=prompt("Please enter your name","");
      if (person!=null &amp;&amp; person!="")
        {
          document.write(person);
        }
  }
  </code></pre>
  
  <p>How can i do this??</p>