title: How can I pass value from javascript to html?
body: <p>I have javascript function that get JSON from another php file but I can't pass value to html file. How can I do it ??</p>
  
  <p>here plese take a look </p>
  
  <pre><code>&lt;body&gt;
      &lt;script type="text/javascript" src="jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      $.getJSON("getquestion.php",function(result)
      {
          document.getElementById("question").innerHTML = result.test_question;   
          testform.textquestion.value = result.test_question;
  
      });
      &lt;/script&gt;
  &lt;form name="testform"&gt; 
  &lt;div id="question"&gt;&lt;/div&gt;
  &lt;input id="aaa" type="text" name="textquestion"&gt;&lt;/input&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>div:question can show data from result.test_question but input:aaa can't.</p>
  
  <p>Could you please teach me how can I pass value to  or  ? and Can I assign name of function .getJSON and how ??</p>