58 lines
1.3 KiB
HTML
58 lines
1.3 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>The complete list of primes.</title>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
|
<meta name="author" content="Luis Silvestre">
|
||
|
<link rel="stylesheet" type="text/css" href="calculate-primes.html.css">
|
||
|
<!--
|
||
|
It is javascipt. What else were you expecting?
|
||
|
Author: Luis Silvestre
|
||
|
-->
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
function isPrime(_n)
|
||
|
{
|
||
|
var _isPrime=true;
|
||
|
var _sqrt=Math.sqrt(_n);
|
||
|
for(var _i=2;_i<=_sqrt;_i++)
|
||
|
if((_n%_i)==0) _isPrime=false;
|
||
|
return _isPrime;
|
||
|
}
|
||
|
|
||
|
function li(_o)
|
||
|
{
|
||
|
var _n=i + 100;
|
||
|
var what="";
|
||
|
for(;i<_n;++i){
|
||
|
if(isPrime(i)){
|
||
|
what += i.toString()+"; ";
|
||
|
}
|
||
|
}
|
||
|
document.getElementById("texto").firstChild.nodeValue = what;
|
||
|
//appendChild(mytext);
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<div class="orangebox">
|
||
|
<p> In this website we list <b> all </b> prime numbers. Every single one of them. <a href="javascript:li()"> Next page. </a></p>
|
||
|
</div>
|
||
|
|
||
|
<div id="texto" class="whitebox" style="height:100000px; border:0px;">
|
||
|
If you can read this, that means that your browser has javascript off and this page is not working.
|
||
|
</div> <br />
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
i =4294967200;
|
||
|
li();
|
||
|
</script>
|
||
|
|
||
|
<div class="orangebox"> <a href="javascript:li()"> Next page. </a> </div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|