アットウィキロゴ

typr

var a=new Array();
 
function sample(){
 
for(s=1;s<61;s++){
a[s]=new Array();    
}    
for(s=1;s<61;s++){
 for(sx=1;sx<61;sx++){   
    a[s][sx]=0;
        if(Math.random()>0.5)a[s][sx]=100;
        }}
 
 
paint();
 
}
 
 
function paint(){
 
var sub=new svgpaint();
 
str="<svg width=\"700\" height=\"700\">";
 
for(s=1;s<61;s++){
for(sx=1;sx<61;sx++){ 
if(a[s][sx]>50)str=str+sub.rect(10*s,600-10*sx,10,10,"blue");
if(a[s][sx]<50)str=str+sub.rect(10*s,600-10*sx,10,10,"red");
}}
 
str=str+"</svg>";
 
$("#memo").html(str);   
 
}
 
最終更新:2015年10月23日 07:47