title: assign javascript variable to jsp code?
body: <p>I have 4 arraylist in jsp and I want to get elements of lists from javascript function. </p>
  
  <p>it looks like there is no problem getting one element from jsp arraylist. </p>
  
  <p>But I don't know how to move multiple or all elements from jsp arraylist to javascript code. </p>
  
  <p>below is my code</p>
  
  <pre><code>&lt;script&gt;
      function makeTable(){
      for(c=0;c&lt;row_num;c++){
          row[c]=document.createElement('tr'); 
          for(k=0;k&lt;cell_num;k++) {
              cell[k]=document.createElement('td');
              cont = document.createElement('a');
              cont.href="./bbs_view.jsp?count=" + c;
              cont.innerHTML ="&lt;%=title.get(0)%&gt;";
              cell[k].appendChild(cont);
              row[c].appendChild(cell[0]);
          }
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>as you can see, above function can get only one element from jsp arraylist. <br>
  is there any way to replace &lt;%=title.get(0)%> to <br>
  something like &lt;%=title.get( javascript var c)%>?