<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> function sample(){ var x=new Array(); for(s=1;s<6;s++){ x[s]=new Array(); } for(s=1;s<6;s++){ for(sx=1;sx<6;sx++){ x[s][sx]=0; }} str="<table>"; for(s=1;s<6;s++){ str=str+"<tr>"; for(sx=1;sx<6;sx++){ if(x[s][sx]==1)str=str+"<td>●</td>"; if(x[s][sx]==0)str=str+"<td>□</td>"; if(x[s][sx]==2)if(s>2)str=str+"<td>〇</td>"; } str=str+"</tr>"; } $("#memo").html(str); } </script>