title: Bind textbox value with dynamic div's
body: <p>I am trying to append / (Bind) textbox innerhtml value to the dynamic div which has the pagination. When I am trying append with textbox with the div I am getting an error.</p>
  
  <p>There are two elements in my initial page First One is for no of pages and other one is for enter some text. If I enter number 2 so two div will appear dynamically. Then I enter the greeting text second text box. Text should appear in the first div and for the second div if i click the button in the bottom second div should be empty. Using Pure javascript (Vanila).</p>
  
  <p>I am trying to get value from the textbox. But I was not able to bind with the p tag which was available dynamically.</p>
  
  <p>Kindly help me.</p>
  
  <pre><code>var gettext_Title = document.getElementById('title_Text')
  var getresult = gettext_Title.value;
  //alert(result);
  var inputElement = document.getElementById("inputAdd_page");
  var totalCount = 0;
  inputElement.addEventListener('blur', function() {
  var count = this.value;
  // Gaurd condition
  // Only if it is a number
  if (count &amp;&amp; !isNaN(count)) {
  fragment = document.createDocumentFragment();
  for (var j = 0; j &lt; count; ++j) {
    spancount = document.createElement('span');
    prevPage = document.createElement('div');
    navbutton = document.createElement('button');
    hTitle = document.createElement('p');
    preview_PageSize = document.getElementById('page');
  
    navpageBtn = document.getElementById('pageBtn');
  
  
    navbutton.className = "div_navig";
    navbutton.setAttribute('id', ['pag_navg' + totalCount]);
    navbutton.setAttribute('data-page', totalCount);
    navbutton.innerHTML = [1 + totalCount];
    navbutton.addEventListener('click', function (e) {
      var el = e.target;
      var page = parseInt(el.getAttribute('data-page'), 10);
      var allPages = document.querySelectorAll('.preview_windowSize_element');
      Array.prototype.forEach.call(allPages, function (pageElement) {
        pageElement.style.zIndex = 0;
        });
  
      var pageEl = document.querySelector('div[data-page="' + page + '"]');
      pageEl.style.zIndex = 10;
      });
  
    spancount.className = "spanCount";
    spancount.innerHTML = [1 + totalCount];
  
    hTitle.setAttribute('id', ['Title' + (totalCount)]);
    hTitle.className = "title_boundry";
  
    prevPage.className = "preview_windowSize_element";
    prevPage.setAttribute('id', ['page' + (totalCount)]);
    prevPage.setAttribute('data-page', totalCount);
    prevPage.appendChild(spancount);
    prevPage.appendChild(hTitle);
    navpageBtn.appendChild(navbutton);
  
    preview_PageSize.insertBefore(prevPage, preview_PageSize.childNodes[0]);
  
    totalCount++;
  }
  
  inputElement.value = "";
  document.body.appendChild(fragment);
  </code></pre>
  
  <p>}
  });</p>
  
  <p>Here is the Jsfiddle <a href="http://jsfiddle.net/karthic2914/aLv96L2o/" rel="nofollow">Link</a></p>
  
  <p>Thanks in advance</p>
  
  <p>Kindly help me</p>
  
  <p>Cheers,</p>