title: Adding javascript variable to html div tag
body: <p>I want to know if it's possible to add a javascript variable to html div tag just like php For example:</p>
  
  <pre><code>    $id = 1;
      &lt;div id="test'.$id.'"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  var id = '1';
  &lt;/script&gt;
  &lt;div id="test..???.??"&gt;&lt;/div&gt;
  </code></pre>