title: Error: Uncaught TypeError: Cannot read property 'value' of null
body: <p>i want to know  why this error is occuring "Uncaught TypeError: Cannot read property 'value' of null"
  and where i am going wrong?</p>
  
  <pre><code> function create()
          {
              var  textbox=document.createElement("input");
              var para=document.createElement("p");
              para.setAttribute("id","p");
              textbox.type='text';
              textbox.value='asdf';
              textbox.setAttribute("id","textbox");
                             textbox.setAttribute("onblur",document.getElementById('p').innerHTML=document.getElementById('textbox').value);
              document.body.appendChild(textbox);
          }
  </code></pre>