Как в функции mismatch получить значение элемента sq1, записанное в него в функции FillInDigits()??? 
function mismatch(n)
{
  alert(document.getElementById("sq1").outerHTML);
}
function FillInDigits()
{
  var sq1 = Math.floor(Math.random()*15 + 1);
  var sq2 = Math.floor(Math.random()*15 + 1);
  mismatch(2);
  
  document.getElementById("sq1").innerHTML = sq1;
  document.getElementById("sq2").innerHTML = sq2;
} 
window.onload = FillInDigits();