<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Title</title>
<script>
var a = prompt('请输入第一个数');
var b = prompt('请输入第二个数');
var c = prompt('请输入第三个数')
var max = 0;
function getSum(sum1, sum2, sum3) {
max = sum1 > sum2 ? sum1 : sum2
return max > sum3 ? max : sum3
}
console.log(getSum(a, b, c))
</script>
</head>
<body>
<div>
</div>
</body>
</html>
黑马js三个数比大小
最新推荐文章于 2024-09-01 02:07:48 发布