Run
<html> <body> <script> function primeall() { var j,b; var lb=parseInt(prompt("enter the lower bound")); var n=parseInt(prompt("enter the upper bound")); for(i=lb;i<=n;i++) { b=0; for(j=1;j<=i;j++) { if(i%j==0) { b=b+1; } } if(b==2) { document.write(i+"</br>"); } } } </script> <form> <input type="button" value="prime number" onclick="primeall();"> </form> </body> </html>