アットウィキロゴ

m77

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
  </head>
  <body onload="sample()">
  <table>
<tr>
<td><p id="p31">abc</p></td>
<td><p id="p21">abc</p></td>
<td><p id="p11">abc</p></td>
</tr>
<tr>
<td><p id="p32">abc</p></td>
<td><p id="p22">abc</p></td>
<td><p id="p12">abc</p></td>
</tr>
<tr>
<td><p id="p33">abc</p></td>
<td><p id="p23">abc</p></td>
<td><p id="p13">abc</p></td>
</tr>
</table>
<?!= HtmlService.createHtmlOutputFromFile('sample').getContent(); ?>
</body>
</html>
 
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 
<script>
 
 var koma=new Array();
var x=new Array();
var y=new Array();
var pos=new Array();
 
function sample(){
 
koma[1]="王";
koma[2]="金";
koma[3]="金";
koma[4]="王";
koma[5]="金";
koma[6]="金";
 
pos[1]="先手";
pos[2]="先手";
pos[3]="先手";
pos[4]="後手";
pos[5]="後手";
pos[6]="後手";
 
x[1]=2;
y[1]=1;  
x[2]=1;
y[2]=1;  
x[3]=3;
y[3]=1;  
 
x[4]=2;
y[4]=3;  
x[5]=1;
y[5]=3;  
x[6]=3;
y[6]=3;  
 
 
for(s=1;s<4;s++){
for(sx=1;sx<4;sx++){
a=sign(s,sx); 
$(a).html("〇");
}}
 
for(s=1;s<7;s++){
a=sign(x[s],y[s]); 
$(a).html(koma[s]);
}         
 
}
 
function sign(x1,y1){
 
str="#p"+x1+y1;
 
return str;
 
}
 
 
</script>
 
最終更新:2017年09月25日 19:20