bon ok, ça fait une heure que je lutte à cause de cet oubli
This commit is contained in:
parent
9f217eeeb1
commit
e32760329a
|
@ -23,24 +23,25 @@ function connectFour(bot1,bot2,xd_check, newGame){
|
||||||
newGame = true;
|
newGame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//empty
|
if (newGame){
|
||||||
while (document.getElementById('fightResult').firstChild) {
|
//empty
|
||||||
document.getElementById('fightResult').removeChild(document.getElementById('fightResult').firstChild);
|
while (document.getElementById('fightResult').firstChild) {
|
||||||
|
document.getElementById('fightResult').removeChild(document.getElementById('fightResult').firstChild);
|
||||||
}
|
}
|
||||||
//create grid
|
//create grid
|
||||||
|
|
||||||
var table=createElem('table',{'class':'battleGrid'});
|
var table=createElem('table',{'class':'battleGrid'});
|
||||||
for (var i=6; i > -1; i--){
|
for (var i=6; i > -1; i--){
|
||||||
var tr=createElem('tr');
|
var tr=createElem('tr');
|
||||||
for (var j=0;j<7; j++){
|
for (var j=0;j<7; j++){
|
||||||
var td=createElem('td',{'id': 'td' + j + '_' + i});
|
var td=createElem('td',{'id': 'td' + j + '_' + i});
|
||||||
tr.appendChild (td);
|
tr.appendChild (td);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.appendChild(tr);
|
||||||
|
}
|
||||||
|
document.getElementById('fightResult').appendChild(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.appendChild(tr);
|
|
||||||
}
|
|
||||||
document.getElementById('fightResult').appendChild(table);
|
|
||||||
|
|
||||||
var xhr = Ajx();
|
var xhr = Ajx();
|
||||||
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
||||||
if(xhr.status == 200) {
|
if(xhr.status == 200) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user