estiloconjavascript.js 606 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript">    
        function estilojs(){
            var i,j;

            for (i=0; i<8; i++) {

                for(j=0; x<8; x++){
                    var idposition="f"+i+j;
                    var p=document.getElementById(idposition);


                        if ((i+j)%2==0) {


                            p.classList.add("tablero");

                        } else {

                            p.classList.add("tablero");
                        }
                }        
                
            }
        }
    </script>
</head>