| 
		
			Сообщение от maksZidan007
			
		
	 | 
	| 
		нет нужно при клике по идее должна бить функцыя в функции
	 | 
	
Да ну? 
<div id="center" style="width: 200px; height: 200px;"></div>
<script>
function qwe(coll){
  var container = document.getElementById("center");
container.innerHTML = '';
  var width = container.clientWidth/coll;
  var height = container.clientHeight/coll;
  for (var i = 0; i<coll;i++){
    for (var j =0; j<coll;j++){
      var sp = document.createElement("span");
      sp.style.border="1px solid #FF00AE";
      sp.style.display = 'inline-block';
      sp.style.width = (width - 2) +"px";
      sp.style.height = (height - 2) +"px";
      container.appendChild(sp);
    }
  }
}
document.getElementById('center').onclick = function() { qwe(6) };
qwe(5);
</script>