title: create multiple span inside div using javascript
body: <p>I have one image, when I am clicking on that image, I am getting one textbox and a button. By clicking on button, I want to put that textbox values in separate spans inside a div with id demo. 
  Ho I can do that using javascript only?</p>
  
  <p>Here is the function in which I was trying the same(I am trying so lots of error must be there)</p>
  
  <pre><code>function addTag(){
  
              var text = document.getElementById('title').value;
              //console.log(text);
              var demoid = document.getElementById('demo');
              console.log(demoid);
  
              var spa = document.createElement('span');
              spa.id = text;
              spa.appendChild(demoid);
              var text = text+' , ';
              spa.innerHTML = text;
              console.log(spa.id);
  
              jQuery("#form_panel").hide();
              jQuery("#someID").hide();
  
              console.log("in addTag");
  
          }
  </code></pre>