title: How to appendChild in INPUT Form
body: <p><a href="https://i.stack.imgur.com/gfb7k.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gfb7k.jpg" alt="enter image description here"></a></p>
  
  <p>Please see code below.how to appendChild in INPUT Form i have to get value in sql on one input type text and btn add function close each value.
  I want all the information form appendChild to be in the form input.</p>
  
  <p>Help me please.</p>
  
  <p>example function not example code: <a href="https://jsfiddle.net/surveyjs/Ljnyaeva/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=Ljnyaeva" rel="nofollow noreferrer">https://jsfiddle.net/surveyjs/Ljnyaeva/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=Ljnyaeva</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function select() {
      var t = document.createTextNode("X");
      var btn = document.createElement("BUTTON");
   var ttt = document.getElementById("mySelect").value;
      var container = document.createElement("INPUT");
      container.setAttribute("type", "text");
      container.setAttribute("value", ttt);
      btn.appendChild(t);
      document.body.appendChild(container);
      document.body.appendChild(btn); 
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form&gt;
    &lt;select id="mySelect"&gt;
      &lt;option value="Apple"&gt;Apple&lt;/option&gt;
      &lt;option value="Orange"&gt;Orange&lt;/option&gt;
      &lt;option value="Pineapple"&gt;Pineapple&lt;/option&gt;
      &lt;option value="Banana"&gt;Banana&lt;/option&gt;
    &lt;/select&gt;
  &lt;/form&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;button onclick="select()"&gt;Try it&lt;/button&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;input id="demo" class="form-control"&gt;</code></pre>
  </div>
  </div>
  </p>