<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script> function f(x){ let s=0 for (i=1;i<=x;i++){ if (x%i==0){ s=s+1 } } if (s==2){ return "素数" }} v=f(21); document.write(v) </script> </head> <body> </body> </html>