Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html>
  <head>
<meta name="description" content="innerHTML can't be trusted" />
  </head>
  <body>
    <div>
      <input type="button" value="Click" onClick="buttonHandler()"/>
      
      <div id="progress">I show the activity of the button above</div>
      
      
    </div>
  </body>
</html>
 
function buttonHandler() {
  var elm = document.getElementById("progress");
  elm.innerHTML = "thinking";
  longPrimeCalc();
  
}
  
function longPrimeCalc() {
  function isPrime (n) {
      if (n < 2) return false;
      var q = Math.sqrt (n);
      for (var i = 2; i <= q; i++)
          if (n % i === 0)
              return false;
      return true;
  }
  return isPrime(1125899839733759);
}
  
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jonahxpro
0viewers