<html> <head> <title>取得两个数中的最大数</title> </head> <body> <script language="javascript"> <!-- a = 1; b = 2; document.write("a = ",a,",b = ",b,"<br>"); document.write("a,b中最大的一个数为:",Math.max(a,b)); document.write("<br>"); document.write("a,b中最小的一个数为:",Math.min(a,b)); //--> </script> </body> </html>