Schuffel_divs.php


Quell Code


<html>

<head>
	<title>Erstes Spiel!</title>

  </head>
<body>
   <button id="butt">Shuffel</button>
  <div id="wrapper"></div>

</body>
 

<script> 
  document.getElementById('butt').onclick=function(){
    document.getElementById('wrapper').innerHTML='';
 function arrayShuffle(){
  var tmp, rand;
  for(var i =0; i < this.length; i++){
    rand = Math.floor(Math.random() * this.length);
    tmp = this[i]; 
    this[i] = this[rand]; 
    this[rand] =tmp;
  }
}
  
Array.prototype.shuffle =arrayShuffle;
  var zahlen = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15);
  

zahlen.shuffle();

 var ausgabe = zahlen.join(" ");
 
  for(f=0;f<=15;f++){
    document.getElementById('wrapper').innerHTML+='<div id="a16" class="kart">'+zahlen[f]+'</div>';
  }
  }
</script>
 
</html>

Error: No site found with the domain 'test.basti1012.bplaced.net' (Learn more)