how can I print javascript variable in input type textbox value like php echo
<p>It is possible like php in javascript as below.... </p>

<pre><code> &lt;?php
     $var1 = "Hello";
     $var2 = "World";
  ?&gt; 
    &lt;input  type="text" value="&lt;?php echo $var1; ?&gt;" /&gt; 
    &lt;input  type="text" value="&lt;?php echo $var2; ?&gt;" /&gt;


    &lt;script type="text/javascript"&gt;
       var str = "abc,def,ghi,jkl,mno,pqr";
        var x = str.split(","); 
     &lt;/script&gt;
</code></pre>

<p>I have input <code>type='text'</code> in the body tag like</p>

<pre><code> &lt;input id="txtOne" name="txtOne" type="text" value="I want to print here using javascript x[0]" /&gt; 

 &lt;input id="txtOne" name="txtOne" type="text" value="I want to print here using javascript x[1]" /&gt; 
</code></pre>

<p>Thanks.</p>