32.html

来自「介绍了javascript的常用的函数」· HTML 代码 · 共 18 行

HTML
18
字号
<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>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?